pipeline_model_wcs_header¶
- grizli.jwst_utils.pipeline_model_wcs_header(datamodel, step=64, degrees=[3, 4, 5, 5], lsq_args={'bounds': (-inf, inf), 'diff_step': 1e-06, 'f_scale': 1000.0, 'ftol': 1e-12, 'gtol': 1e-12, 'jac': '2-point', 'jac_sparsity': None, 'kwargs': {}, 'loss': 'soft_l1', 'max_nfev': 100, 'method': 'trf', 'tr_options': {}, 'tr_solver': None, 'verbose': 0, 'x_scale': 1.0, 'xtol': 1e-12}, crpix=None, verbose=True, initial_header=None, max_rms=0.0001, set_diff_step=False, get_guess=False, fast_coeffs=True, uvxy=None)[source]¶
Iterative pipeline to refine the SIP headers
- Parameters
- datamodel
jwst.datamodels.ImageModel Input image model.
- stepint
Step size for fitting the SIP model.
- degreeslist
List of SIP polynomial degrees to try.
- lsq_argsdict
Arguments for
scipy.optimize.least_squares.- crpixNone or (float, float)
Reference pixel. If
Noneset to the array center.- verbosebool
Messaging to terminal.
- initial_headerNone or
Header Initial header to use as a guess for the SIP fit.
- max_rmsfloat
Maximum RMS for the SIP fit.
- set_diff_stepbool
Set
lsq_args['diff_step']to the pixel scale.- get_guessbool
Get initial guess for SIP coefficients from the
datamodel.meta.wcs.- fast_coeffsbool
Use a fast method to compute the SIP coefficients.
- uvxyNone or (array, array, array, array)
Manually specify detector and target coordinates for positions to use for the SIP fit, where
uvxy = (x, y, ra, dec)and the detector coordinates are zero-index. If not specified, make a grid withstep
- datamodel
- Returns
- header‘~astropy.io.fits.Header`
Header with SIP WCS