nexuscontributions / nxazint

NXazint contribution
https://manual.nexusformat.org/
Other
0 stars 0 forks source link

Initialize NXazint contribution #3

Open woutdenolf opened 3 months ago

woutdenolf commented 3 months ago

Current NXazint Status

The docs are build daily from the main branch: NXDL --> HTML

First time contributors

Clone the project locally and install all python packages needed to build the docs

python -m venv azintenv
source azintenv/bin/activate

git clone git@github.com:nexuscontributions/nxazint.git
cd nxazint

make install

Build the docs locally

source azintenv/bin/activate
make local
firefox build/manual/build/html/index.html

Existing application definitions that are related

Initialize NXazint contribution

woutdenolf commented 3 months ago

Ping @meghdadyazdi Please accept the invitation and invite other MAXIV members to the nxazint team on github.

kif commented 3 months ago

FYI, pyFAI is already compatible with:

fgjorup commented 2 months ago

Feel free to add me when you get the chance @meghdadyazdi

woutdenolf commented 2 months ago

Seems like +1 length for edges is actually allowed in NXdata but got lost over time in the docs: https://github.com/nexusformat/definitions/pull/1396#issuecomment-2234015257. So good news for this MR.

zdemat commented 2 months ago

Feel free to add me here @woutdenolf , my GitHub user name is @zdemat.

zdemat commented 1 week ago

@woutdenolf just a status report on this:

fgjorup commented 1 week ago

Just to elaborate a bit on Zdenek's comment: We suggest a base class, for now called NXazint, and a series of application classes. I don't know whether all of those application classes needs to be strictly defined in NeXus, or if they should just be suggestions to data structuring. The idea would be to have one or more application classes as NXsubentries in one unified NXentry, which also contains the common instrument information (monochromator, source, etc.), which the subentries soft link to.

Unfortunately I could not attach the example.h5 here on github, but here is a rough summary tree:

entry/ - (NXentry)
entry/instrument/ - (NXinstrument)
    entry/instrument/azint1d/ - (NXazint)
        entry/instrument/azint1d/data - (NX_FLOAT)
        entry/instrument/azint1d/process/ - (NXprocess)
            entry/instrument/azint1d/process/date - (NX_DATE_TIME)
            entry/instrument/azint1d/process/note - (NX_CHAR)
            entry/instrument/azint1d/process/parameters/ - (NXparameters)
                entry/instrument/azint1d/process/parameters/error_model - (NX_CHAR)
                entry/instrument/azint1d/process/parameters/mask_file - (NX_CHAR)
                entry/instrument/azint1d/process/parameters/num_of_azi_bins - (NX_INT)
                entry/instrument/azint1d/process/parameters/num_of_radial_bins - (NX_INT)
                entry/instrument/azint1d/process/parameters/pixel_splitting - (NX_INT)
                entry/instrument/azint1d/process/parameters/polarization_factor - (NX_FLOAT)
                entry/instrument/azint1d/process/parameters/poni - (NX_CHAR)
                entry/instrument/azint1d/process/parameters/solid_angle_correction - (NX_BOOLEAN)
                entry/instrument/azint1d/process/parameters/unit - (NX_CHAR)
                entry/instrument/azint1d/process/parameters/wavelength - (NX_FLOAT)
            entry/instrument/azint1d/process/program - (NX_CHAR)
            entry/instrument/azint1d/process/reference - (NX_CHAR)
            entry/instrument/azint1d/process/version - (NX_CHAR)
        entry/instrument/azint1d/radial_axis - (NX_FLOAT)
    entry/instrument/azint2d/ - (NXazint)
        entry/instrument/azint2d/azimuthal_axis - (NX_FLOAT)
        entry/instrument/azint2d/data - (NX_FLOAT)
        entry/instrument/azint2d/data_errors - (NX_FLOAT)
        entry/instrument/azint2d/process/ - (NXprocess)
            entry/instrument/azint2d/process/date - (NX_DATE_TIME)
            entry/instrument/azint2d/process/note - (NX_CHAR)
            entry/instrument/azint2d/process/parameters/ - (NXparameters)
                entry/instrument/azint2d/process/parameters/error_model - (NX_CHAR)
                entry/instrument/azint2d/process/parameters/mask_file - (NX_CHAR)
                entry/instrument/azint2d/process/parameters/num_of_azi_bins - (NX_INT)
                entry/instrument/azint2d/process/parameters/num_of_radial_bins - (NX_INT)
                entry/instrument/azint2d/process/parameters/pixel_splitting - (NX_INT)
                entry/instrument/azint2d/process/parameters/polarization_factor - (NX_FLOAT)
                entry/instrument/azint2d/process/parameters/poni - (NX_CHAR)
                entry/instrument/azint2d/process/parameters/solid_angle_correction - (NX_BOOLEAN)
                entry/instrument/azint2d/process/parameters/unit - (NX_CHAR)
                entry/instrument/azint2d/process/parameters/wavelength - (NX_FLOAT)
            entry/instrument/azint2d/process/program - (NX_CHAR)
            entry/instrument/azint2d/process/reference - (NX_CHAR)
            entry/instrument/azint2d/process/version - (NX_CHAR)
        entry/instrument/azint2d/radial_axis - (NX_FLOAT)
    entry/instrument/monochromator/ - (NXmonochromator)
        entry/instrument/monochromator/energy - (NX_FLOAT)
        entry/instrument/monochromator/wavelength - (NX_FLOAT)
    entry/instrument/name - (NX_CHAR)
    entry/instrument/source/ - (NXsource)
        entry/instrument/source/name - (NX_CHAR)
        entry/instrument/source/probe - (NX_CHAR)
        entry/instrument/source/type - (NX_CHAR)
entry/integration1d/ - (NXsubentry)
    entry/integration1d/data/ - (NXdata)
    entry/integration1d/definition
    entry/integration1d/instrument/ - (NXinstrument)
entry/integration2d/ - (NXsubentry)
    entry/integration2d/data/ - (NXdata)
    entry/integration2d/definition
    entry/integration2d/instrument/ - (NXinstrument)
entry/xrdmap/ - (NXsubentry)
    entry/xrdmap/data/ - (NXdata)
        entry/xrdmap/data/I - (NX_FLOAT)
    entry/xrdmap/definition
zdemat commented 6 days ago

There is NXiqproc. It is an application class and there are more classes like this. I think the advantage of the application class is that we may be more strict in requirements on the present fields and their names.

@SAnsell can NXiqproc somehow cover the QxQy case?

woutdenolf commented 6 days ago

Note that we can now use single class inheritance in NeXus.

zdemat commented 6 days ago

That is a good point but NXiqproc is really quite an Application class and we do not want most of its fields (instrument, sample etc.) and specialized fields like qx etc. The idea of NXazint (not relevant if it is base-class or application-class) is that the AZINT program, script, pipeline can write it independently of other info, as e.g. detector data.