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

Fairmat 2024: actuators and sensors in NXenvironment #1414

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

lukaspie
Copy link
Contributor

@lukaspie lukaspie commented Sep 23, 2024

This PR is aimed at further elaborating NXenvironment:

  • A new base class NXactuator is added that closely resembles NXsensor, but instead of sensing something (like e.g. an NXsensor describing a thermocouple), it produces an actuation/output (think a sample heater for example).
  • Unnamed NXsensor and NXactuator are added to NXenvironment. In addtion, a value field is added to NXenvironment, which shall only be used when there is no ctuator/sensor that controls/measures the environment parameters, but the user would still like to give a value for it. An example would be a measured at room temperature where the temperature is only estimated.
  • To describe the hardware of such sensors and actuators (or indeed any other instrument parts), a new base class NXfabrication was added, containing information about the vendor, model, serial number, etc.
  • The base class NXpid was moved from contributed to base_classes, since it is used in NXactuator and accepted base classes should (as far as we understand) only make use of base classes that are themselves also accepted (see discussion below). EDIT: NXpid to be handled in Move NXpid to base classes #1522.

@lukaspie lukaspie marked this pull request as draft September 23, 2024 15:58
@lukaspie lukaspie force-pushed the fairmat-2024-nxenvironment branch 2 times, most recently from 34a85f6 to c840b48 Compare September 23, 2024 16:45
@lukaspie lukaspie marked this pull request as ready for review September 23, 2024 17:19
@sanbrock sanbrock mentioned this pull request Sep 29, 2024
This was linked to issues Sep 29, 2024
@lukaspie lukaspie mentioned this pull request Sep 29, 2024
@lukaspie
Copy link
Contributor Author

lukaspie commented Oct 1, 2024

Dev notes to keep track:

  • NXfabrication: implemented suggested edits
  • NXsensor: ok
  • NXactuator: implemented suggested edits
  • NXenvironment: ok

depends on / blocked by:

ToDo:

  • Moved NXpid from contributed_definitions to base_classes -> will probably require another NIAC vote (cc @sanbrock)

@lukaspie lukaspie mentioned this pull request Oct 8, 2024
@lukaspie lukaspie force-pushed the fairmat-2024-nxenvironment branch from 6f8b898 to 4e9cb80 Compare October 16, 2024 08:21
@phyy-nx
Copy link
Contributor

phyy-nx commented Dec 6, 2024

@lukaspie can you write a description at the top of the file? Also, can you say more about the TODO comment on NXpid? NXpid was not voted on. Indeed, only the changes voted on are allowed, otherwise we need a new vote. Thanks!

@lukaspie
Copy link
Contributor Author

lukaspie commented Dec 6, 2024

@lukaspie can you write a description at the top of the file? Also, can you say more about the TODO comment on NXpid? NXpid was not voted on. Indeed, only the changes voted on are allowed, otherwise we need a new vote. Thanks!

I added a description.

My understanding is that accepted base classes should only make use of base classes that are themselves also accepted. Since NXactuator (newly introduced and already voted on here) uses the base class NXpid, NXpid was moved from contributed to base_classes. We only realized this after the vote had been made. What's your opinion on this? Can base classes that are in the base_classes folder (i.e., accepted) cite base classes in contributed? We had the same problem with NXlens_em in #1407.

lukaspie and others added 19 commits December 11, 2024 13:39
# Conflicts:
#	base_classes/nyaml/NXenvironment.yaml
#	contributed_definitions/NXmpes.nxdl.xml
#	contributed_definitions/nyaml/NXmpes.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/NXentry.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
# Conflicts:
#	base_classes/NXdetector.nxdl.xml
#	base_classes/NXinstrument.nxdl.xml
#	base_classes/NXsensor.nxdl.xml
#	base_classes/NXsource.nxdl.xml
# Conflicts:
#	base_classes/NXinstrument.nxdl.xml
#	base_classes/nyaml/NXenvironment.yaml
…s in the catchen test

# Conflicts:
#	base_classes/NXdata.nxdl.xml
…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/NXentry.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
bring back files lost during cherry pick
Co-authored-by: Aaron S. Brewster <[email protected]>
@lukaspie lukaspie force-pushed the fairmat-2024-nxenvironment branch from 4e9cb80 to 1820ea0 Compare December 11, 2024 12:39
@lukaspie
Copy link
Contributor Author

lukaspie commented Dec 11, 2024

@phyy-nx following up on the discussion here and in #1407, I removed NXpid (for which there was no vote yet) and made a new PR for it (see #1522) for which there will need to be a separate vote. With these changes, I think the PR here only contains things that have already been ratified and can thus be reviewed/merged.

@lukaspie lukaspie added NIAC approved and removed NIAC vote needed PR needs an approving vote from NIAC before merge labels Dec 11, 2024
Copy link
Contributor

@phyy-nx phyy-nx left a comment

Choose a reason for hiding this comment

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

This was already approved by NIAC vote (#1451 (comment)). After these changes are done, we can merge.

base_classes/NXactuator.nxdl.xml Outdated Show resolved Hide resolved
base_classes/NXactuator.nxdl.xml Outdated Show resolved Hide resolved
<doc>
Describe where the actuator is attached to.
This could be an instance of NXsample or a device on NXinstrument.
</doc>
Copy link
Contributor

Choose a reason for hiding this comment

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

attached_to --> actuation_target

Should be a NeXus path as opposed to a description

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

base_classes/NXfabrication.nxdl.xml Outdated Show resolved Hide resolved
base_classes/NXfabrication.nxdl.xml Outdated Show resolved Hide resolved
@lukaspie
Copy link
Contributor Author

@phyy-nx all comments addressed, feel free to finally review and merge. Thanks!

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

Successfully merging this pull request may close these issues.

NXenvironment NXsensor
7 participants