-
Notifications
You must be signed in to change notification settings - Fork 65
Fairmat 2024: new fields for experiment description in NXentry and NXsubentry #1412
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
base: main
Are you sure you want to change the base?
Conversation
ff097f7 to
e0b24a6
Compare
|
Do we know what these are identifiers of? There is an issue about it: #1043 |
|
Instead of this, add PID to NXobject as an attribute. |
|
Will a group ever need more than one PID? |
|
Note that previous versions of this PR contained changes to the @phyy-nx @sanbrock since there has anyway been no vote, I would suggest we wait with this PR until the discussion around #1486 has been settled and then make the necessary changes here on top afterwards. |
22a6bf9 to
9e877ad
Compare
We were thinking about replacing the existing identifiers with fields starting with |
|
Seems reasonable to me. |
23ce833 to
0097b28
Compare
I made the necessary changes and deprecated the |
… version of yaml. Removing unintensional comments
* Add appdef/bc yaml files to gitignore * Improve Makefile for nxdl build * Tricking make to avoid circular dependency * Generalization and cleanup * Change chmod 755 to 644 for NXentry * Reintroduce for-loop for make nyaml * Adds push to github pages * Set correct docs dir * Prepare building * Change id to name * Build and deploy * Push pages to fairmat-docs * Adds clean flag * Use docs folder * Target fairmat branch to rebuild live-docs * Removes old workflows * Updates color and logo * Optimise styling * Add logo padding * Run ci on pr * Adds cleanup ci * Removes yaml files from .gitignore # Conflicts: # .gitignore # Makefile # manual/source/_static/to_alabaster.css # manual/source/img/FAIRmat_new.png
# Conflicts: # base_classes/NXsubentry.nxdl.xml # base_classes/nyaml/NXentry.yaml # base_classes/nyaml/NXsubentry.yaml # contributed_definitions/NXsts.nxdl.xml # contributed_definitions/nyaml/NXsensor_scan.yaml # contributed_definitions/nyaml/NXsts.yaml # contributed_definitions/nyaml/NXtransmission.yaml
…ersion # Conflicts: # applications/NXarpes.nxdl.xml # applications/nyaml/NXarpes.yaml # base_classes/NXaperture.nxdl.xml # base_classes/NXbeam.nxdl.xml # base_classes/NXdata.nxdl.xml # base_classes/NXdetector.nxdl.xml # base_classes/NXenvironment.nxdl.xml # base_classes/NXinstrument.nxdl.xml # base_classes/NXmonochromator.nxdl.xml # base_classes/NXroot.nxdl.xml # base_classes/NXsample.nxdl.xml # base_classes/NXsample_component.nxdl.xml # base_classes/NXsensor.nxdl.xml # base_classes/NXsource.nxdl.xml # base_classes/NXsubentry.nxdl.xml # base_classes/NXtransformations.nxdl.xml # base_classes/NXuser.nxdl.xml # base_classes/nyaml/NXaperture.yaml # base_classes/nyaml/NXbeam.yaml # base_classes/nyaml/NXdata.yaml # base_classes/nyaml/NXdetector.yaml # base_classes/nyaml/NXentry.yaml # base_classes/nyaml/NXenvironment.yaml # base_classes/nyaml/NXinstrument.yaml # base_classes/nyaml/NXmonochromator.yaml # base_classes/nyaml/NXprocess.yaml # base_classes/nyaml/NXroot.yaml # base_classes/nyaml/NXsample.yaml # base_classes/nyaml/NXsample_component.yaml # base_classes/nyaml/NXsensor.yaml # base_classes/nyaml/NXsource.yaml # base_classes/nyaml/NXsubentry.yaml # base_classes/nyaml/NXtransformations.yaml # base_classes/nyaml/NXuser.yaml
|
From Telco 08/11/25: NXentry@experiment_identifier seems baked deep into the DNA of NeXus, so deprecating it in favor of NXobject@identifierNAME could cause some problems. Would welcome feedback from the NIAC here. |
|
Alternatively, we could change NXobject@identiferNAME to NXobject@PREFIXidentifierSUFFIX, which would allow the use of experiment_identifer as is. But that would lock away the string 'identifer' entirely, such that it could never be used by a user. |
|
From Telco 08/25/25: Two proposals:
Regardless, we shouldn't deprecate Pros/cons for 1.: simpler but locks away the word 'identifer' forever Can I get a straw poll here on the preferred method? Do you prefer 1. over 2.? Vote 👍 for 1. and 👎 for 2. |
|
Moar votes on the straw poll pls? :) |
|
NXarchive uses the same convention of Proposal from the telco: nearly all of the identifierNAME convention from #1486 is new, but all the instances of NAMEidentifier (e.g. This would change new application definitions such as Becomes And becomes This would also alter Can I get a straw poll on this idea here? Vote 👍 or 👎 on this comment for if you agree to go from identifierNAME to NAMEidentifier. |
|
Does the new |
|
RE: @phyy-nx @sanbrock
|
Not necessarily required but the situation a thing has not always exactly only one PID globally assigned might happen in the wild |
@mkuehbach, I'm a little confused by this statement. Are you saying that |
|
Line 186 in 41d8157
"(empty string allowed)" means NAME_identifier allows for _identifier. NAME can be blank.
|
|
In the discussion around Line 186 in 41d8157
I would strongly suggest to keep this convention because if there is a single identifier, it just makes sense to call it Changing to |
|
New proposal, we can't get consensus here. So @lukaspie simply remove the deprecations from this pull request and we'll vote on the new terms. |
done |
|
Ok, this PR is now ready for a vote. Please vote using emojis, 👍 for yes, 👎 for now, and anything else e.g. 👀 for abstain. Voting will close in 2 weeks. Thanks! |
|
I have a problem with the "experiment_location" field. The doc string says: "City and country where the experiment took place", which means that 2 pieces of information are intended for a single field. I would assume that it is intended to be a single comma separated list of "city, country" but we should not be in the business of making assumptions! A separate issue is why these fields are being placed in NXentry, rather than NXroot? It does not make sense to me for such things to vary between different NXentry's in the one file. |
|
On the first point I suggest to make NXresearch_project(NXnote) there one could have single fields city, country, geolocation, like for NXuser. Then in NXentry one would hook a group research_project but agree but yay maybe better to move this idea to an issue to the NXDL2026 milestone and instead now add city, country this is already good, geolocation I find better but there are different use cases with different location precision demands. On the issue with assuming that each NXentry in a file was generated at the same location. Admitted this is a frequent case where multiple methods are combined at the same beamline or lab but what if I use a NeXus file to bundle such information for an interdisciplinary team where the sample was physically shipped and indeed the measurements or computer simulations/analyses where done in different places. Pinning that information hard into the root does no longer cleanly support such use case. |
|
I don't think we need to go so far as to completely change the field into an NXresearch_project and would rather suggest adding to the doc string that the value of the field should be a single string comprised of the city, a comma and then the country. I do agree that someone might want to append an NXentry to an existing file after moving an experiment to a new location (perhaps for a complementary technique), thus making a location described in the root inaccurate. However, this would be considered by many to be poor practice since data files should not be altered after a measurement is concluded. In the given example, better practice would be to have separate NeXus files for the measurements at different locations, and if a combined file is desired, then a new meta-file should be created that links to the relevant data files. I don't see any good reason why such a meta-file should include location information. |
|
Sorry, I'm probably simply missing something, but I don't understand the motivation of this pull request. Certainly, the information is worth recording. However, we already have To me, it looks like the new fields would be duplicating information available through existing base classes. Some additional thoughts... If we want to record geographical location (a reasonable thing to do), please define how this information is recorded. For example, we could specify that country is recorded using ISO 3166-1 (specifying whether A2 or A3 is acceptable). Germany would be "DE" (ISO-3166-1 A2) or "DEU" (ISO-3166-1 A3). For cities, there's geonames. For Hamburg the GeoNames ID 2911298. City names can be ambiguous, even within a single country. Another possible route would be to use persistent identifiers (PID), instead of using textual information, when describing this information. Using PIDs would have higher fidelity, but requires the software to do a metadata lookup to get information (name, geographic location, etc) about the target. The good part is that support for PIDs is already available in NeXus. Here are possible PIDs for the different targets:
|
|
The vote has not passed, and additional discussion is needed. We invite the participants to join our next Telco, which will be advertised on the nexus-committee mailing list. |
Here, several new fields are added to
NXentry, to give a more detailed of where (experiment_{location,facility,institution}) and when (experiment_{start_date,end_date}) the experiment was performed.