Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: first pass at ingesting nexus files #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tacaswell
Copy link
Contributor

Based on chopper.nxs from nexpy examples

attn @stuartcampbell

@codecov-io
Copy link

codecov-io commented Mar 2, 2017

Codecov Report

Merging #28 into master will decrease coverage by 6.1%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   96.38%   90.28%   -6.11%     
==========================================
  Files           5        6       +1     
  Lines         858      916      +58     
==========================================
  Hits          827      827              
- Misses         31       89      +58
Impacted Files Coverage Δ
suitcase/nexus.py 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92c1094...f9042fa. Read the comment docs.

@stuartcampbell
Copy link
Member

stuartcampbell commented Apr 27, 2017

How do we test this ? Wouldn't we need to store the chopper.nxs file somewhere ?

My first reaction is that we should change the name as it is for a very specific NeXus definition. I'll get the file and have a look at it to see which "application" definition it is adhering to. Then maybe call it something like nexus_directtof.py.

Based on chopper.nxs from nexpy examples
@tacaswell
Copy link
Contributor Author

What are the application names from the chopper file and the format that Pete wrote?

@stuartcampbell
Copy link
Member

stuartcampbell commented May 2, 2017

@prjemian Just wondering on your thoughts about the suggestion to 'partition' the NeXus code by application definition type ? Does that seem sensible ? If so, what IDF does your file correspond to ?

@prjemian
Copy link
Contributor

prjemian commented May 2, 2017 via email

@stuartcampbell
Copy link
Member

Sorry @prjemian I mistyped! I mean the application definition ?

@prjemian
Copy link
Contributor

prjemian commented May 3, 2017

I believe I was shooting for a plain NXentry group with NXinstrument subgroup and linked content in NXdata group. There is no application definition now that is sufficiently generic.

We could create our own application definition and that may be useful to give a defined interface. Comments?

@stuartcampbell
Copy link
Member

I must admit this was part of my fiendish plan was to make this type of file a new nexus definition. I don't think we need to have a hard/strict format yet (as it is bound to change as we learn more) but any suggestions on a name ?

@prjemian
Copy link
Contributor

prjemian commented May 3, 2017

First idea: NXbluesky (as NXsuitcase seems suggestive yet so non-descriptive)

@danielballan danielballan changed the title ENH: first pass at injesting nexus files ENH: first pass at ingesting nexus files May 3, 2017
@prjemian
Copy link
Contributor

prjemian commented May 3, 2017

Here is the initial NeXus schema (from the source code):

NXroot
    @default = name of first NXentry group
    NXentry (one for each header)
        @default = name of first NXdata group
        descriptor_name:NXlog (one for each descriptor)
            dataset (one for each data_key)
                @axes = name of dataset_timestamps if provided
            dataset_timestamps (one for each data_key timestamps if provided)
        descriptor_name_data:NXdata (one for each descriptor)
            @signal = name of first dataset in this group
            dataset (HDF5 hard link to original dataset in NXlog group)
            dataset_timestamps (HDF5 hard link to original dataset_timestamps in NXlog group if provided)

But that needs improvement as begin to better understand what information is standard in the start and event descriptors documents

return v


def injest_nexus(fname):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be ingest_nexus ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klauer and @danielballan have already thoroughly pointed out this error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - didn't notice and couldn't find their comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants