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

input of pscale value leads to miscalculate of shape [2,2] pipeline version 1.15.1 #8833

Open
Fishchips-Fujiang opened this issue Sep 26, 2024 · 3 comments

Comments

@Fishchips-Fujiang
Copy link

            output_wcs = wcs_from_footprints(
                dmodels=ref_img,
                pscale_ratio=1,
                pscale=0.04,
                rotation=0.0,
                shape = None, 
                crpix=None,
                crval=None,
                wcslist=gwcs_list,
            )from jwst.assign_wcs.util import wcs_from_footprints
@Fishchips-Fujiang
Copy link
Author

Just a follow up about this problem, in version 1.15.1, how should I change the pscale or other parameter to construct a new wcs based on the pixel scale needed? I have tried to set it to differnet values ,altering the parameter args based on the lastest version, but it is not work. Still, this wcs_from_footprint set the new wcs pscale for short wave band to 0.031 and LW to 0.0629. Do I able to set it manually?

@melanieclarke
Copy link
Collaborator

I'm not sure I understand what you are trying to do here, but it does look to me like the value you provided for pscale is unusually large. The pscale parameter for that function expects values in degrees, so pscale=0.04 would make pixels 144 arcsec across. That might explain why the output shape was not what you expected.

If you are trying to make a resampled image with a custom pixel scale, you might try setting the pixel_scale parameter for the resampling step, instead of creating a custom WCS. This parameter expects values in arcsec. Here are the docs for the optional parameters for resampling:
https://jwst-pipeline.readthedocs.io/en/latest/jwst/resample/arguments.html

If you need further support, I recommend contacting the JWST Help Desk (https://stsci.service-now.com/jwst). If you don't have a MyST account, you should also be able to contact help@stsci.edu

@Fishchips-Fujiang
Copy link
Author

Thank you for your comment, the unit I applied is in arcsec, which is about 0.0000111 degree. However, after I switch the parameter to the correct value based on unit of degree, the output_wcs is still based on the pscale input images. eg.(if I use the wcs_from_footprints for a group of SW images, not matter how I change the pscale, the output keeps about the default 0.31 arcsec and the same situation also happens in processing LW images). I think this might cause by the import problem? I am a little bit confused.

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

No branches or pull requests

2 participants