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

Add parameter_march scripts #144

Merged
merged 3 commits into from
Oct 26, 2024
Merged

Add parameter_march scripts #144

merged 3 commits into from
Oct 26, 2024

Conversation

gmegh
Copy link
Collaborator

@gmegh gmegh commented Aug 14, 2024

No description provided.

@gmegh gmegh requested a review from tribeiro August 14, 2024 20:43
type: number
minimum: 0
maximum: 90
filter:

Choose a reason for hiding this comment

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

I'm wondering on the merits of including filter as a parameter here, as opposed to simply always using the current filter (and relegating a filter change to a separate script as necessary). Changing a filter is a fairly big deal for LSSTCam (though less so for ComCam), so it feels like it maybe shouldn't be buried in a separate script; it should be its own script. I don't think the same applies to any of the other parameters here (the initial slew could also be a big deal, but since the script ratchets in between triplets I don't really see an alternative). Curious what @tribeiro and others think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure if there has been a resolution for this, but FWIW I think the ability to change the filter like this is already present in other scripts. We can just leave it blank if we don't want to change it?

Copy link
Member

Choose a reason for hiding this comment

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

You are right that changing the filter for LSSTCam is big deal. I have to think about this, for now, I would suggest we leave it here.

Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

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

Here is an initial round of comments. I stopped while reviewing the comcam script as I think there are changes there that will impact the rest of the code.

@@ -0,0 +1,4 @@
- - Introduced a suite of scripts for taking sensitivity matrices and parameter marches with LSSTCam and LSSTComCam:
Copy link
Member

Choose a reason for hiding this comment

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

Instead of adding multiple entries in one file, create one individual file for each entry. For each additional file after the first one, append a number to the file name, e.g.;

  • doc/news/DM-45761.feature.rst
  • doc/news/DM-45761.feature.rst.1
  • doc/news/DM-45761.feature.rst.2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although, it looks like the Towncrier tests are complaining now...

type: number
minimum: 0
maximum: 90
filter:
Copy link
Member

Choose a reason for hiding this comment

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

You are right that changing the filter for LSSTCam is big deal. I have to think about this, for now, I would suggest we leave it here.

f"does not match n_steps {config.n_steps}."
)
else:
raise TypeError("rotation_sequence must be either a number or a list.")
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this enforced by the schema already?

raise NotImplementedError()

@abc.abstractmethod
def take_images(self) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Can't you make take_images be the same for both cameras using self.camera?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well, for ComCam take images are triplets, while for LSSTCam take images is only taking on image. That's why I had separated. Additionally, in the case of ComCam we ping RA to start processing the data

Copy link
Member

Choose a reason for hiding this comment

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

Is LSSTCam really taking only one image? I think the idea here would be to do intra/extra regardless no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, LSSTCam gets intra focal and extra focal images directly from the corners for free, so we don't need to move the focal plane, unless we are using the "full array mode"


@property
@abc.abstractmethod
def tcs(self):
Copy link
Member

Choose a reason for hiding this comment

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

The tcs is the same for both cameras, no need to make it an abstract property.

raise NotImplementedError()

@abc.abstractmethod
async def configure_tcs(self):
Copy link
Member

Choose a reason for hiding this comment

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

This should be the same for both cameras as well.

self.instrument_name = "LSSTComCam"

@property
def tcs(self):
Copy link
Member

Choose a reason for hiding this comment

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

See how this is just the same method for ComCam and LSSTCam? It should be in the base class.

metadata.instrument = self.get_instrument_name()
metadata.filter = self.get_instrument_filter()

async def take_images(
Copy link
Member

Choose a reason for hiding this comment

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

you should be able to implement this method in the base class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See comment above. Why would I not separate it, since ComCam will be taking triplets while LSSTCam takes only one image? Doesn't it make it cleaner as is?

@gmegh gmegh requested a review from tribeiro September 23, 2024 12:52
@gmegh gmegh force-pushed the tickets/DM-45761 branch 2 times, most recently from 107ab4c to aca266b Compare October 25, 2024 21:25
@gmegh gmegh merged commit 0a9fce3 into develop Oct 26, 2024
2 checks passed
@gmegh gmegh deleted the tickets/DM-45761 branch October 26, 2024 01:28
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