diff --git a/bin/picca_metal_dmat.py b/bin/picca_metal_dmat.py index 19432ff09..e73382d86 100755 --- a/bin/picca_metal_dmat.py +++ b/bin/picca_metal_dmat.py @@ -17,6 +17,8 @@ from picca import constants, cf, utils, io from picca.utils import userprint +#store the default silicon metals modelled in the CF/XCF +DEFAULT_SI_METALS = ['SiIII(1207)','SiII(1190)','SiII(1193)','SiII(1260)'] def calc_metal_dmat(abs_igm1, abs_igm2, healpixs): """Computes the metal distortion matrix. @@ -279,6 +281,12 @@ def main(cmdargs): help='Rebin factor for deltas. If not None, deltas will ' 'be rebinned by that factor') + parser.add_argument('--fast-metals', + action='store_true', + required=False, + help='compute only the metal correlations used by Vega' + 'i.e. 4 LyaxSi matrices and CIVxCIV') + args = parser.parse_args(cmdargs) if args.nproc is None: @@ -416,6 +424,12 @@ def main(cmdargs): for index2, abs_igm2 in enumerate(abs_igm_2[index0:]): if index1 == 0 and index2 == 0: continue + + if args.fast_metals: + if not (abs_igm1 == "LYA" and abs_igm2 in DEFAULT_SI_METALS) \ + and not (abs_igm1 == "CIV(eff)" and abs_igm1 == abs_igm2): + continue + cf.counter.value = 0 calc_metal_dmat_wrapper = partial(calc_metal_dmat, abs_igm1, abs_igm2)