Closed FedericoBerlfein closed 2 months ago
I just pushed the changes discussed here. Mainly, I changed the main function from_images
to do some sanity checks first (check pixel scale is the same for all images, check dimensions for all images match) and do sorting of the wavelengths and images. It then calls the _from_images
function which has the actual functionality. It now calculates the default stepk and maxk from the average profile of the input images.
@rmjarvis I noticed that the code does not hit 100% coverage on codecov, however, the line that its telling me is not covered is a commented line. Not sure why this is happening or how to fix it. Let me know if you have any thoughts on this. I have also made changes based on previous conversations that are ready for review whenever you have time, let me know of any further comments or changes!
Looks good. Thanks Federico.
I have added a classmethod to the InterpolatedChromaticObject class called
from_images()
that takes in as input a list of GalsimImage
objects and a list of wavelengths. This will allow the user to created aInterpolatedChromaticObject
directly from images. The method also takes as arguments a list of stepk and maxk values if the user wishes to pass these directly to theInterpolatedImage
object that is created within the method. Any other keyword that theInterpolatedImage
class accepts can in addition be passed askwargs
to the method. In addition, unit tests have been added to the filetest_chromatic.py
that compare this initialization method to the "default" method. Any feedback/suggestions are highly appreciated!