refit_beams

grizli.fitting.refit_beams(root='j012017+213343', append='x', id=708, keep_dict={'G141': [201, 291]}, poly_order=3, make_products=True, run_fit=True, **kwargs)[source]

Regenerate a MultiBeam object selecting only certiain PAs

Parameters
rootstr

Root of the “beams.fits” file to load.

appendstr

String to append to the rootname of the updated products.

idint

Object ID. The input filename is built like

>>> beams_file = f'{root}_{id:05d}.beams.fits'
keep_dictbool

Dictionary of the PAs/grisms to keep. (See the grizli.multifit.MultiBeam.PA attribute.)

poly_orderint

Order of the polynomial to fit.

make_productsbool

Make stacked spectra and diagnostic figures.

run_fitbool

Run the redshift fit on the new products

kwargsdict

Optional keywords passed to run_all_parallel.

Returns
mbMultiBeam

New beam object.