Skip to content

Refactor 24 trend#198

Open
gonzalezma wants to merge 481 commits into
refactor_24from
refactor_24_trend
Open

Refactor 24 trend#198
gonzalezma wants to merge 481 commits into
refactor_24from
refactor_24_trend

Conversation

@gonzalezma

Copy link
Copy Markdown

Proposition to modify the original Trend class. The idea is that one can define as many axes as desired, using a dict to store them. Each axis can be linked to a metadata (given a list with the path to the metadata as before) or generated "on the fly" (in this case one has also to give a list, with the constraints that the first element must NOT be a string and the number of elements in the list must be equal to the number of SasData objects in data. Are these limitations OK)?

If it is agreed that this is the right way, next steps should be to clean up a little bit the code and add new utests.

rprospero and others added 15 commits March 10, 2026 16:12
* 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
…h is defined by one or the other, and they are not the same. IMO, we assume the width values given in the dQ column correspond to sigma.
…et methods do not exist. Valid solution or should we implement _raw_metadata and children?
…Using a dict now for the axis and changed also name to plural: Trend.trend_axes, so unit tests changed accordingly
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Comment thread docs/source/user/data/data_formats_help.rst
Comment thread sasdata/metadata.py Outdated
Comment thread sasdata/trend.py Outdated
Comment thread sasdata/trend.py Outdated
Comment thread sasdata/trend.py Outdated
Comment thread sasdata/trend.py Outdated
@DrPaulSharp DrPaulSharp force-pushed the refactor_24 branch 3 times, most recently from 90413d7 to dd691e0 Compare May 18, 2026 17:07
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants