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

Refactor stamp.py #468

Merged
merged 8 commits into from
May 20, 2024
Merged

Refactor stamp.py #468

merged 8 commits into from
May 20, 2024

Conversation

esheldon
Copy link
Contributor

@esheldon esheldon commented May 9, 2024

Pull out some useful functionality.

Useful stuff for calculating stamp sizes was put into stamp_utils.py

    get_stamp_size (was in LSST_SiliconBuilder.__init__)
        get_star_stamp_size
        get_gal_stamp_size
    get_good_phot_stamp_size (was LSST_SiliconBuilder._getGoodPhotImageSize)
    get_good_phot_stamp_size1 (was LSST_SiliconBuilder._getGoodPhotImageSize1)

Useful stuff for psfs was put into psf_utils.py

    make_double_gaussian (was LSST_SiliconBuilder.DoubleGaussian)
    make_kolmogorov_and_gaussian_psf was (LSST_SiliconBuilder.Kolmogorov_and_Gaussian_PSF)
    make_fft_psf (was LSST_SiliconBuilder.make_fft_psf)

Add a .flake8 to avoid some style complaints

flake8 was calling out a lot of style issues, turn those off
Pull out some useful functionality.

Useful stuff for calculating stamp sizes was put into stamp_utils.py

    get_stamp_size (was in LSST_SiliconBuilder.__init__)
        get_star_stamp_size
        get_gal_stamp_size
    get_good_phot_stamp_size (was LSST_SiliconBuilder._getGoodPhotImageSize)
    get_good_phot_stamp_size1 (was LSST_SiliconBuilder._getGoodPhotImageSize1)

Useful stuff for psfs was put into psf_utils.py

    make_double_gaussian (was LSST_SiliconBuilder.DoubleGaussian)
    make_kolmogorov_and_gaussian_psf was (LSST_SiliconBuilder.Kolmogorov_and_Gaussian_PSF)
    make_fft_psf (was LSST_SiliconBuilder.make_fft_psf)
@esheldon
Copy link
Contributor Author

esheldon commented May 9, 2024

Who wants to take this one?

@esheldon
Copy link
Contributor Author

The data download failed in the CI. I don't have permission to rerun the workflow, can someone please kick that off?

Copy link
Contributor

@rmjarvis rmjarvis left a comment

Choose a reason for hiding this comment

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

LGTM. Just one doc typo.


def get_gal_stamp_size(obj_achrom, nominal_flux, noise_var, Nmax, pixel_scale):
"""
Get a stamp size for a star (DeltaFunction) object
Copy link
Contributor

Choose a reason for hiding this comment

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

This doc is wrong.

@esheldon
Copy link
Contributor Author

Is this OK to merge now?

@rmjarvis
Copy link
Contributor

It's fine by me, but I usually let Jim or Chris make the call.

@jchiang87
Copy link
Collaborator

It's ok with me.

@cwwalter
Copy link
Member

OK.

@rmjarvis rmjarvis merged commit 4d4ba61 into LSSTDESC:main May 20, 2024
3 checks passed
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.

4 participants