Skip to content

Unifying ResponseMatrix, hide pySC from pyAML API#216

Merged
JeanLucPons merged 1 commit intomainfrom
response_matrix_standardization
Mar 12, 2026
Merged

Unifying ResponseMatrix, hide pySC from pyAML API#216
JeanLucPons merged 1 commit intomainfrom
response_matrix_standardization

Conversation

@JeanLucPons
Copy link
Contributor

@JeanLucPons JeanLucPons commented Mar 12, 2026

This PR is a very first step toward unification of various response matrices and hiding pySC from pyAML API.

Copy link
Contributor

@gubaidulinvadim gubaidulinvadim left a comment

Choose a reason for hiding this comment

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

I think this is a positive change. It would perhaps be good to define some abstract interface for response matrices. I think many of the steps are the same for tune, orbit and chromaticity, not only saving and loading from a file.

@JeanLucPons
Copy link
Contributor Author

Right, this is only a first step.

@JeanLucPons JeanLucPons merged commit a234ce5 into main Mar 12, 2026
3 checks passed
@JeanLucPons JeanLucPons deleted the response_matrix_standardization branch March 12, 2026 08:28

@property
def reponse_matrix(self) -> ResponseMatrix | None:
return self._cfg.response_matrix
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this property, because _pySC_response_matrix holds almost all of the information.

Is it in anticipation that a pyaml ResponseMatrix holds inside of it a _pySC_response_matrix, and then everything goes through the "pyaml" ResponseMatrix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this is the idea

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pySC should not appear to the end user neither methods, neither internal structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also currently thinking how to have a base class ResponseMatrix with basically only common field and having specific response matrices. For instance, i would like to not see the rf_respone in the base class.

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.

3 participants