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 ComCam vignetting #449

Merged
merged 9 commits into from
Feb 28, 2024
Merged

Add ComCam vignetting #449

merged 9 commits into from
Feb 28, 2024

Conversation

jmeyers314
Copy link
Member

I updated the files in devel-tools/vignetting to handle both LsstCam and ComCam. I made one algorithmic tweak, which was to reflect the input (radius, flux) data about the radius=0 axis so when fitting the spline, the symmetry of the input data and knots forces the spline to have zero derivative at radius=0.

ComCam and (updated) LsstCam pngs below:

LSSTCam_vignetting_profile_fit
LSSTComCamSim_vignetting_profile_fit

To use the new vignetting profile for ComCam, update your yaml config with:

input:
  vignetting:
    file_name: LSSTComCamSim_vignetting_data.json

Copy link
Collaborator

@jchiang87 jchiang87 left a comment

Choose a reason for hiding this comment

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

Look good. I do have one question which may warrant more explanation in the README.

@@ -14,10 +15,12 @@ Instructions for generating vignetting spline fits.
photons per star. Currently, `magnorm=22.25` will produce ~100k
incident photons per star.

4. To run the simulation run `galsim imsim-vignetting.yaml`.
4. To run the simulation run `galsim imsim-vignetting.yaml`. For
ComCam, you can add `eval_variables.bisComCam=True`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does adding this do?

Copy link
Member Author

Choose a reason for hiding this comment

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

It sets this eval variable, which is then used in the yaml file to select between comcam/lsstcam settings in a few places. E.g., here.

The b in bisComCam (for boolean) is unfortunate. (Would have been nice to just have isComCam which is more readable.). But that's a limitation of the galsim config system. I can add a bit more text to the README.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe bIsComCam or bUseComCam is better?

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, I updated the README text and went with bIsComCam.

@jmeyers314 jmeyers314 merged commit 8a94631 into main Feb 28, 2024
3 checks passed
@jmeyers314 jmeyers314 deleted the comcam_vignetting branch February 28, 2024 20:17
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.

2 participants