Conversation
sasdata/quantities/_units_base.py
Outdated
| si_scaling_factor: float, | ||
| dimensions: Dimensions): | ||
|
|
||
| self.scale = si_scaling_factor |
There was a problem hiding this comment.
Is there any reason not to call self.scale self.si_scaling_factor as well?
sasdata/quantities/units.py
Outdated
|
|
||
|
|
||
| # | ||
| # Units by type |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Yeah, sounds like a good plan
a16b0a6 to
e27d0cc
Compare
6e3ba34 to
c010919
Compare
d4683bd to
3df6e01
Compare
b32dbfe to
6f3b4af
Compare
…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.
…nd removed for loops and most conditional logic
…multisasentry_multisasdata.h5, nxcansas_1Dand2D_multisasdata.h5, and nxcansas_1Dand2D_multisasentry.h5 test data files
…d return in NDRebin __call__
…ged name of parse_float_first to parse_float
…d return in NDRebin __call__
…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))
Adding ND rebinner to refactor_24
Full name for quantity
* Data sketch * Units now available and grouped * More units, towards formatting * Units and accessors draft ready to begin tests on * Some tests * Work towards new data object * Accessor changes * Remove duplicate evaluate function. * Removes duplicate code * Fills out log operations * Adds log evaluation tests * Tidies up operations code * Corrects derivative for Div operation * Adds tests * Refactors Log operation * Ruff format * Removes unnecessary file --------- Co-authored-by: lucas-wilkins <lucas.wilkins@stfc.ac.uk> Co-authored-by: James Crake-Merani <James.Crake-Merani@stfc.ac.uk>
* Adds exp operation and corrects log derivatives * Adjusts math library imports * Adds trig operations * Adds evaluation tests * Corrects unary clean signatures * Adds tests * Adds clean for exp and ln * Adds parameterised fixtures * Addresses review comments
490cec4 to
ee6af02
Compare
There was a problem hiding this comment.
No quality gates enabled for this code.
See analysis details in CodeScene
Absence of Expected Change Pattern
- sasdata/sasdata/dataloader/readers/red2d_reader.py is usually changed with: sasdata/sasdata/dataloader/readers/ascii_reader.py, sasdata/sasdata/dataloader/readers/tiff_reader.py
Quality Gate Profile: Custom Configuration
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
Main branch for the refactoring project