Skip to content

Conversation

@lucas-wilkins
Copy link
Contributor

Main branch for the refactoring project

si_scaling_factor: float,
dimensions: Dimensions):

self.scale = si_scaling_factor
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason not to call self.scale self.si_scaling_factor as well?



#
# Units by type
Copy link
Contributor

Choose a reason for hiding this comment

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

While writing the unit tests for my parser, I had a thought. I think the unit groups should perhaps go into a separate module. To import a unit, we would do

from sasdata.quantities.units import meters. meters_per_second ...'

Which makes sense. But to import a unit group, the import statement would look like this.

from sasdata.quantities.units import speed, acceleration ...'

Which might be a little confusing because we're importing a unit group from the units module. Its a fairly minor change but having a separate unit group module might make this clearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, sounds like a good plan

@DrPaulSharp DrPaulSharp force-pushed the refactor_24 branch 2 times, most recently from a16b0a6 to e27d0cc Compare August 11, 2025 15:43
@DrPaulSharp DrPaulSharp force-pushed the refactor_24 branch 2 times, most recently from d4683bd to 3df6e01 Compare November 7, 2025 17:52
paulneves77 and others added 13 commits December 9, 2025 12:21
…andards (now looks directly at canSAS_class instead of the group name. This is because the group name is allowed to be anything, but the canSAS_class is fixed. also allowed raw to be none in metadata because raw is not a part of the NXcanSAS standard. also ran ruff which cleaned up the rpm in units and accessors and si.
…examplefile.h5. Also added support for when the NX_class attribute has a canSAS_class name. Also fixed bug when no instrument, sample etc are given in the file.
…multisasentry_multisasdata.h5, nxcansas_1Dand2D_multisasdata.h5, and nxcansas_1Dand2D_multisasentry.h5 test data files
…ta and nxcansas_1Dand2D_multisasentry where the detector distance was read wrong because of the difference between node.astype(float)[0] and float(node[0].astype(str))
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.

7 participants