diff --git a/py/picca/bin/picca_cf.py b/py/picca/bin/picca_cf.py index 87ce33255..13a499d9a 100644 --- a/py/picca/bin/picca_cf.py +++ b/py/picca/bin/picca_cf.py @@ -134,30 +134,6 @@ def main(cmdargs=None): ), ) - parser.add_argument( - "--z-cut-min", - type=float, - default=0.0, - required=False, - help=( - "Use only pairs of forest x object with the mean " - "of the last absorber redshift and the object " - "redshift larger than z-cut-min" - ), - ) - - parser.add_argument( - "--z-cut-max", - type=float, - default=10.0, - required=False, - help=( - "Use only pairs of forest x object with the mean " - "of the last absorber redshift and the object " - "redshift smaller than z-cut-max" - ), - ) - parser.add_argument( "--z-min-sources", type=float, @@ -350,8 +326,6 @@ def main(cmdargs=None): cf.r_par_max = args.rp_max cf.r_trans_max = args.rt_max cf.r_par_min = args.rp_min - cf.z_cut_max = args.z_cut_max - cf.z_cut_min = args.z_cut_min cf.z_min_pairs = args.z_min_pairs cf.z_max_pairs = args.z_max_pairs cf.num_bins_r_par = args.np @@ -506,12 +480,12 @@ def main(cmdargs=None): 'value': cf.num_bins_r_trans, 'comment': 'Number of bins in r-transverse' }, { - 'name': 'ZCUTMIN', - 'value': cf.z_cut_min, + 'name': 'ZMIN', + 'value': cf.z_min_pairs, 'comment': 'Minimum redshift of pairs' }, { - 'name': 'ZCUTMAX', - 'value': cf.z_cut_max, + 'name': 'ZMAX', + 'value': cf.z_max_pairs, 'comment': 'Maximum redshift of pairs' }, { 'name': 'NSIDE', diff --git a/py/picca/bin/picca_cf_angl.py b/py/picca/bin/picca_cf_angl.py index 6d912eaea..78be291f2 100644 --- a/py/picca/bin/picca_cf_angl.py +++ b/py/picca/bin/picca_cf_angl.py @@ -89,24 +89,6 @@ def main(cmdargs): required=False, help='Number of angular bins') - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument( '--z-min-sources', type=float, @@ -197,8 +179,6 @@ def main(cmdargs): cf.r_par_min = args.wr_min cf.r_par_max = args.wr_max cf.r_trans_max = args.ang_max - cf.z_cut_max = args.z_cut_max - cf.z_cut_min = args.z_cut_min cf.num_bins_r_par = args.np cf.num_bins_r_trans = args.nt cf.nside = args.nside @@ -305,14 +285,6 @@ def main(cmdargs): 'name': 'NT', 'value': cf.num_bins_r_trans, 'comment': 'Number of bins in angle' - }, { - 'name': 'ZCUTMIN', - 'value': cf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, { - 'name': 'ZCUTMAX', - 'value': cf.z_cut_max, - 'comment': 'Maximum redshift of pairs' }, { 'name': 'NSIDE', 'value': cf.nside, diff --git a/py/picca/bin/picca_coadd_zint.py b/py/picca/bin/picca_coadd_zint.py index 007d7c24f..5347e6b01 100644 --- a/py/picca/bin/picca_coadd_zint.py +++ b/py/picca/bin/picca_coadd_zint.py @@ -382,8 +382,12 @@ def coadd_dmats(input_files,output_file): return def main(cmdargs): - """Coadds correlation function from different redshift intervals""" - parser = argparse.ArgumentParser() + """This script is deprecated and will be removed in future versions. + Coadds correlation function from different redshift intervals""" + parser = argparse.ArgumentParser( + description=("This script is deprecated and will be removed in future versions." + " Coadds correlation function from different redshift intervals") + ) parser.add_argument("--data", type=str, diff --git a/py/picca/bin/picca_compute_pk_pksb.py b/py/picca/bin/picca_compute_pk_pksb.py index fbde082a7..36e55c5b6 100644 --- a/py/picca/bin/picca_compute_pk_pksb.py +++ b/py/picca/bin/picca_compute_pk_pksb.py @@ -14,7 +14,11 @@ from picca.constants import SPEED_LIGHT def main(cmdargs): - parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + description=("This script is deprecated and will be removed in future versions." + " Use the make_template.py script in Vega instead.") + ) parser.add_argument('-i','--ini', type=str, required=True, help='Input config file for CAMB') diff --git a/py/picca/bin/picca_dmat.py b/py/picca/bin/picca_dmat.py index 61bce4070..bd153d22a 100644 --- a/py/picca/bin/picca_dmat.py +++ b/py/picca/bin/picca_dmat.py @@ -138,30 +138,6 @@ def main(cmdargs=None): ), ) - parser.add_argument( - "--z-cut-min", - type=float, - default=0.0, - required=False, - help=( - "Use only pairs of forest x object with the mean of the last " - "absorber redshift and the object redshift larger than " - "z-cut-min" - ), - ) - - parser.add_argument( - "--z-cut-max", - type=float, - default=10.0, - required=False, - help=( - "Use only pairs of forest x object with the mean of the last " - "absorber redshift and the object redshift smaller than " - "z-cut-max" - ), - ) - parser.add_argument( "--z-min-sources", type=float, @@ -357,8 +333,6 @@ def main(cmdargs=None): cf.r_par_max = args.rp_max cf.r_par_min = args.rp_min cf.r_trans_max = args.rt_max - cf.z_cut_max = args.z_cut_max - cf.z_cut_min = args.z_cut_min cf.z_min_pairs = args.z_min_pairs cf.z_max_pairs = args.z_max_pairs cf.num_bins_r_par = args.np @@ -549,13 +523,13 @@ def main(cmdargs=None): "comment": "Coefficient for model binning", }, { - "name": "ZCUTMIN", - "value": cf.z_cut_min, + "name": "ZMIN", + "value": cf.z_min_pairs, "comment": "Minimum redshift of pairs", }, { - "name": "ZCUTMAX", - "value": cf.z_cut_max, + "name": "ZMAX", + "value": cf.z_max_pairs, "comment": "Maximum redshift of pairs", }, {"name": "REJ", "value": cf.reject, "comment": "Rejection factor"}, diff --git a/py/picca/bin/picca_export.py b/py/picca/bin/picca_export.py index 886b7ab16..9f44bc900 100644 --- a/py/picca/bin/picca_export.py +++ b/py/picca/bin/picca_export.py @@ -367,6 +367,14 @@ def main(cmdargs=None): 'name': 'NT', 'value': num_bins_r_trans, 'comment': 'Number of bins in r-transverse' + }, { + 'name': 'ZMIN', + 'value': head['ZMIN'], + 'comment': 'Minimum redshift of pairs' + }, { + 'name': 'ZMAX', + 'value': head['ZMAX'], + 'comment': 'Maximum redshift of pairs' }, { 'name': 'OMEGAM', 'value': head['OMEGAM'], diff --git a/py/picca/bin/picca_fast_metal_dmat.py b/py/picca/bin/picca_fast_metal_dmat.py index 01a2fbd2f..f7145c491 100644 --- a/py/picca/bin/picca_fast_metal_dmat.py +++ b/py/picca/bin/picca_fast_metal_dmat.py @@ -223,7 +223,9 @@ def main(cmdargs=None): absorption.""" parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, - description='Computes metal matrices') + description=('This script is deprecated and will be removed in future versions. ' + 'Use Vega functionality instead.') + ) parser.add_argument('--out', type=str, @@ -292,24 +294,6 @@ def main(cmdargs=None): help=('Coefficient multiplying np and nt to get finner binning for the ' 'model')) - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument('--z-min-sources', type=float, default=0., @@ -439,8 +423,6 @@ def main(cmdargs=None): cf.r_par_max = args.rp_max cf.r_trans_max = args.rt_max cf.r_par_min = args.rp_min - cf.z_cut_max = args.z_cut_max - cf.z_cut_min = args.z_cut_min cf.num_bins_r_par = args.np * args.coef_binning_model cf.num_bins_r_trans = args.nt * args.coef_binning_model cf.num_model_bins_r_par = args.np * args.coef_binning_model @@ -572,14 +554,6 @@ def main(cmdargs=None): 'name': 'COEFMOD', 'value': args.coef_binning_model, 'comment': 'Coefficient for model binning' - }, { - 'name': 'ZCUTMIN', - 'value': cf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, { - 'name': 'ZCUTMAX', - 'value': cf.z_cut_max, - 'comment': 'Maximum redshift of pairs' }, { 'name': 'REJ', 'value': cf.reject, diff --git a/py/picca/bin/picca_fast_metal_xdmat.py b/py/picca/bin/picca_fast_metal_xdmat.py index d8c812be0..8bf8aa754 100644 --- a/py/picca/bin/picca_fast_metal_xdmat.py +++ b/py/picca/bin/picca_fast_metal_xdmat.py @@ -198,8 +198,9 @@ def main(cmdargs=None): a list of IGM absorption.""" parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, - description=('Computes metal matrices for the cross-correlation ' - 'delta x object for a list of IGM absorption.')) + description=('This script is deprecated and will be removed in future versions. ' + 'Use Vega functionality instead.') + ) parser.add_argument('--out', type=str, @@ -287,24 +288,6 @@ def main(cmdargs=None): required=False, help='Max redshift for object field') - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument('--z-min-sources', type=float, default=0., @@ -414,8 +397,6 @@ def main(cmdargs=None): xcf.r_par_max = args.rp_max xcf.r_par_min = args.rp_min xcf.r_trans_max = args.rt_max - xcf.z_cut_max = args.z_cut_max - xcf.z_cut_min = args.z_cut_min xcf.num_bins_r_par = args.np * args.coef_binning_model xcf.num_bins_r_trans = args.nt * args.coef_binning_model xcf.num_model_bins_r_par = args.np * args.coef_binning_model @@ -532,14 +513,6 @@ def main(cmdargs=None): 'name': 'COEFMOD', 'value': args.coef_binning_model, 'comment': 'Coefficient for model binning' - }, { - 'name': 'ZCUTMIN', - 'value': xcf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, { - 'name': 'ZCUTMAX', - 'value': xcf.z_cut_max, - 'comment': 'Maximum redshift of pairs' }, { 'name': 'OMEGAM', 'value': args.fid_Om, diff --git a/py/picca/bin/picca_metal_dmat.py b/py/picca/bin/picca_metal_dmat.py index 874c08436..8adb4d606 100644 --- a/py/picca/bin/picca_metal_dmat.py +++ b/py/picca/bin/picca_metal_dmat.py @@ -112,24 +112,6 @@ def main(cmdargs=None): help=('Coefficient multiplying np and nt to get finner binning for the ' 'model')) - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument( '--z-min-sources', type=float, @@ -297,8 +279,6 @@ def main(cmdargs=None): cf.r_par_max = args.rp_max cf.r_trans_max = args.rt_max cf.r_par_min = args.rp_min - cf.z_cut_max = args.z_cut_max - cf.z_cut_min = args.z_cut_min cf.num_bins_r_par = args.np * args.coef_binning_model cf.num_bins_r_trans = args.nt * args.coef_binning_model cf.num_model_bins_r_par = args.np * args.coef_binning_model @@ -509,16 +489,6 @@ def main(cmdargs=None): 'value': args.coef_binning_model, 'comment': 'Coefficient for model binning' }, - { - 'name': 'ZCUTMIN', - 'value': cf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, - { - 'name': 'ZCUTMAX', - 'value': cf.z_cut_max, - 'comment': 'Maximum redshift of pairs' - }, { 'name': 'REJ', 'value': cf.reject, diff --git a/py/picca/bin/picca_metal_xdmat.py b/py/picca/bin/picca_metal_xdmat.py index b63885e06..78dacd9e7 100644 --- a/py/picca/bin/picca_metal_xdmat.py +++ b/py/picca/bin/picca_metal_xdmat.py @@ -124,24 +124,6 @@ def main(cmdargs=None): required=False, help='Max redshift for object field') - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument( '--z-min-sources', type=float, @@ -277,8 +259,6 @@ def main(cmdargs=None): xcf.r_par_max = args.rp_max xcf.r_par_min = args.rp_min xcf.r_trans_max = args.rt_max - xcf.z_cut_max = args.z_cut_max - xcf.z_cut_min = args.z_cut_min xcf.num_bins_r_par = args.np * args.coef_binning_model xcf.num_bins_r_trans = args.nt * args.coef_binning_model xcf.num_model_bins_r_par = args.np * args.coef_binning_model @@ -444,16 +424,6 @@ def main(cmdargs=None): 'value': args.coef_binning_model, 'comment': 'Coefficient for model binning' }, - { - 'name': 'ZCUTMIN', - 'value': xcf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, - { - 'name': 'ZCUTMAX', - 'value': xcf.z_cut_max, - 'comment': 'Maximum redshift of pairs' - }, { 'name': 'REJ', 'value': xcf.reject, diff --git a/py/picca/bin/picca_wick.py b/py/picca/bin/picca_wick.py index 1d2113d4d..05247309b 100644 --- a/py/picca/bin/picca_wick.py +++ b/py/picca/bin/picca_wick.py @@ -91,24 +91,6 @@ def main(cmdargs): required=False, help='Number of r-transverse bins') - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument( '--z-min-sources', type=float, @@ -288,8 +270,6 @@ def main(cmdargs): cf.r_par_max = args.rp_max cf.r_trans_max = args.rt_max cf.r_par_min = args.rp_min - cf.z_cut_max = args.z_cut_max - cf.z_cut_min = args.z_cut_min cf.num_bins_r_par = args.np cf.num_bins_r_trans = args.nt cf.nside = args.nside @@ -511,16 +491,6 @@ def main(cmdargs): 'value': cf.num_bins_r_trans, 'comment': 'Number of bins in r-transverse' }, - { - 'name': 'ZCUTMIN', - 'value': cf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, - { - 'name': 'ZCUTMAX', - 'value': cf.z_cut_max, - 'comment': 'Maximum redshift of pairs' - }, { 'name': 'REJ', 'value': cf.reject, diff --git a/py/picca/bin/picca_xcf.py b/py/picca/bin/picca_xcf.py index 11f698a0d..8ca14395e 100644 --- a/py/picca/bin/picca_xcf.py +++ b/py/picca/bin/picca_xcf.py @@ -152,30 +152,6 @@ def main(cmdargs=None): ), ) - parser.add_argument( - "--z-cut-min", - type=float, - default=0.0, - required=False, - help=( - "Use only pairs of forest x object with the mean of the last " - "absorber redshift and the object redshift larger than " - "z-cut-min" - ), - ) - - parser.add_argument( - "--z-cut-max", - type=float, - default=10.0, - required=False, - help=( - "Use only pairs of forest x object with the mean of the last " - "absorber redshift and the object redshift smaller than " - "z-cut-max" - ), - ) - parser.add_argument( "--z-min-sources", type=float, @@ -352,8 +328,6 @@ def main(cmdargs=None): xcf.r_par_max = args.rp_max xcf.r_par_min = args.rp_min - xcf.z_cut_max = args.z_cut_max - xcf.z_cut_min = args.z_cut_min xcf.z_min_pairs = args.z_min_pairs xcf.z_max_pairs = args.z_max_pairs xcf.r_trans_max = args.rt_max @@ -535,12 +509,12 @@ def main(cmdargs=None): 'value': xcf.num_bins_r_trans, 'comment': 'Number of bins in r-transverse' }, { - 'name': 'ZCUTMIN', - 'value': xcf.z_cut_min, + 'name': 'ZMIN', + 'value': xcf.z_min_pairs, 'comment': 'Minimum redshift of pairs' }, { - 'name': 'ZCUTMAX', - 'value': xcf.z_cut_max, + 'name': 'ZMAX', + 'value': xcf.z_max_pairs, 'comment': 'Maximum redshift of pairs' }, { 'name': 'NSIDE', diff --git a/py/picca/bin/picca_xcf1d.py b/py/picca/bin/picca_xcf1d.py index 3fc91e6d7..cd9ac8b27 100644 --- a/py/picca/bin/picca_xcf1d.py +++ b/py/picca/bin/picca_xcf1d.py @@ -92,24 +92,6 @@ def main(cmdargs): required=False, help='Max redshift for object field') - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument( '--z-min-sources', type=float, @@ -198,8 +180,6 @@ def main(cmdargs): xcf.r_par_min = args.wr_min xcf.r_par_max = args.wr_max xcf.r_trans_max = 1.e-6 - xcf.z_cut_min = args.z_cut_min - xcf.z_cut_max = args.z_cut_max xcf.num_bins_r_par = args.np xcf.num_bins_r_trans = 1 xcf.nside = args.nside @@ -304,14 +284,6 @@ def main(cmdargs): 'name': 'NP', 'value': xcf.num_bins_r_par, 'comment': 'Number of bins in wavelength ratio' - }, { - 'name': 'ZCUTMIN', - 'value': xcf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, { - 'name': 'ZCUTMAX', - 'value': xcf.z_cut_max, - 'comment': 'Maximum redshift of pairs' }, { 'name': 'NSIDE', 'value': xcf.nside, diff --git a/py/picca/bin/picca_xcf_angl.py b/py/picca/bin/picca_xcf_angl.py index ebb5ccf02..1469e17ae 100644 --- a/py/picca/bin/picca_xcf_angl.py +++ b/py/picca/bin/picca_xcf_angl.py @@ -110,24 +110,6 @@ def main(cmdargs): required=False, help='Max redshift for object field') - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument( '--z-min-sources', type=float, @@ -243,8 +225,6 @@ def main(cmdargs): xcf.r_par_min = args.wr_min xcf.r_par_max = args.wr_max xcf.r_trans_max = args.ang_max - xcf.z_cut_min = args.z_cut_min - xcf.z_cut_max = args.z_cut_max xcf.num_bins_r_par = args.np xcf.num_bins_r_trans = args.nt xcf.nside = args.nside @@ -368,14 +348,6 @@ def main(cmdargs): 'name': 'NT', 'value': xcf.num_bins_r_trans, 'comment': 'Number of bins in angle' - }, { - 'name': 'ZCUTMIN', - 'value': xcf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, { - 'name': 'ZCUTMAX', - 'value': xcf.z_cut_max, - 'comment': 'Maximum redshift of pairs' }, { 'name': 'NSIDE', 'value': xcf.nside, diff --git a/py/picca/bin/picca_xdmat.py b/py/picca/bin/picca_xdmat.py index fd08763a0..46817aab7 100644 --- a/py/picca/bin/picca_xdmat.py +++ b/py/picca/bin/picca_xdmat.py @@ -163,30 +163,6 @@ def main(cmdargs=None): ), ) - parser.add_argument( - "--z-cut-min", - type=float, - default=0.0, - required=False, - help=( - "Use only pairs of forest x object with the mean of the last " - "absorber redshift and the object redshift larger than " - "z-cut-min" - ), - ) - - parser.add_argument( - "--z-cut-max", - type=float, - default=10.0, - required=False, - help=( - "Use only pairs of forest x object with the mean of the last " - "absorber redshift and the object redshift smaller than " - "z-cut-max" - ), - ) - parser.add_argument( "--z-min-sources", type=float, @@ -350,8 +326,6 @@ def main(cmdargs=None): xcf.r_par_max = args.rp_max xcf.r_par_min = args.rp_min xcf.r_trans_max = args.rt_max - xcf.z_cut_max = args.z_cut_max - xcf.z_cut_min = args.z_cut_min xcf.z_min_pairs = args.z_min_pairs xcf.z_max_pairs = args.z_max_pairs xcf.num_bins_r_par = args.np @@ -536,13 +510,13 @@ def main(cmdargs=None): "comment": "Coefficient for model binning", }, { - "name": "ZCUTMIN", - "value": xcf.z_cut_min, + "name": "ZMIN", + "value": xcf.z_min_pairs, "comment": "Minimum redshift of pairs", }, { - "name": "ZCUTMAX", - "value": xcf.z_cut_max, + "name": "ZMAX", + "value": xcf.z_max_pairs, "comment": "Maximum redshift of pairs", }, {"name": "REJ", "value": xcf.reject, "comment": "Rejection factor"}, diff --git a/py/picca/bin/picca_xwick.py b/py/picca/bin/picca_xwick.py index 877d5f97c..544083041 100644 --- a/py/picca/bin/picca_xwick.py +++ b/py/picca/bin/picca_xwick.py @@ -111,24 +111,6 @@ def main(cmdargs): required=False, help='Max redshift for object field') - parser.add_argument( - '--z-cut-min', - type=float, - default=0., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift larger than ' - 'z-cut-min')) - - parser.add_argument( - '--z-cut-max', - type=float, - default=10., - required=False, - help=('Use only pairs of forest x object with the mean of the last ' - 'absorber redshift and the object redshift smaller than ' - 'z-cut-max')) - parser.add_argument( '--z-min-sources', type=float, @@ -262,8 +244,6 @@ def main(cmdargs): xcf.r_par_min = args.rp_min xcf.r_par_max = args.rp_max xcf.r_trans_max = args.rt_max - xcf.z_cut_min = args.z_cut_min - xcf.z_cut_max = args.z_cut_max xcf.num_bins_r_par = args.np xcf.num_bins_r_trans = args.nt xcf.nside = args.nside @@ -379,8 +359,6 @@ def main(cmdargs): cf.data = xcf.data cf.ang_max = xcf.ang_max cf.nside = xcf.nside - cf.z_cut_max = xcf.z_cut_max - cf.z_cut_min = xcf.z_cut_min ### Send xcf.counter = Value('i', 0) @@ -461,16 +439,6 @@ def main(cmdargs): 'value': xcf.num_bins_r_trans, 'comment': 'Number of bins in r-transverse' }, - { - 'name': 'ZCUTMIN', - 'value': xcf.z_cut_min, - 'comment': 'Minimum redshift of pairs' - }, - { - 'name': 'ZCUTMAX', - 'value': xcf.z_cut_max, - 'comment': 'Maximum redshift of pairs' - }, { 'name': 'REJ', 'value': xcf.reject, diff --git a/py/picca/cf.py b/py/picca/cf.py index e845d824e..9fc9dd00b 100644 --- a/py/picca/cf.py +++ b/py/picca/cf.py @@ -31,8 +31,6 @@ num_model_bins_r_par = None r_par_max = None r_par_min = None -z_cut_max = None -z_cut_min = None z_min_pairs = None z_max_pairs = None r_trans_max = None @@ -126,22 +124,13 @@ def fill_neighs(healpixs): w = ang < ang_max neighbours = np.array(neighbours)[w] if data2 is not None: - delta.neighbours = [ - other_delta - for other_delta in neighbours - if ( - (other_delta.z[-1] + delta.z[-1]) / 2.0 >= z_cut_min - and (other_delta.z[-1] + delta.z[-1]) / 2.0 < z_cut_max - ) - ] + delta.neighbours = neighbours else: delta.neighbours = [ other_delta for other_delta in neighbours if ( delta.ra > other_delta.ra - and (other_delta.z[-1] + delta.z[-1]) / 2.0 >= z_cut_min - and (other_delta.z[-1] + delta.z[-1]) / 2.0 < z_cut_max ) ] diff --git a/py/picca/tests/data/test_cor/cf.fits.gz b/py/picca/tests/data/test_cor/cf.fits.gz index 686c94e64..1dd89b8a0 100644 Binary files a/py/picca/tests/data/test_cor/cf.fits.gz and b/py/picca/tests/data/test_cor/cf.fits.gz differ diff --git a/py/picca/tests/data/test_cor/cf_angl_zcuts.fits.gz b/py/picca/tests/data/test_cor/cf_angl_zcuts.fits.gz deleted file mode 100644 index adbf83166..000000000 Binary files a/py/picca/tests/data/test_cor/cf_angl_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/cf_cross.fits.gz b/py/picca/tests/data/test_cor/cf_cross.fits.gz index fe083f3f0..28aa00743 100644 Binary files a/py/picca/tests/data/test_cor/cf_cross.fits.gz and b/py/picca/tests/data/test_cor/cf_cross.fits.gz differ diff --git a/py/picca/tests/data/test_cor/cf_cross_zcuts.fits.gz b/py/picca/tests/data/test_cor/cf_cross_zcuts.fits.gz index 6f22c84c6..0217743f7 100644 Binary files a/py/picca/tests/data/test_cor/cf_cross_zcuts.fits.gz and b/py/picca/tests/data/test_cor/cf_cross_zcuts.fits.gz differ diff --git a/py/picca/tests/data/test_cor/cf_image_zcuts.fits.gz b/py/picca/tests/data/test_cor/cf_image_zcuts.fits.gz index 2cd8fc071..5867820e6 100644 Binary files a/py/picca/tests/data/test_cor/cf_image_zcuts.fits.gz and b/py/picca/tests/data/test_cor/cf_image_zcuts.fits.gz differ diff --git a/py/picca/tests/data/test_cor/cf_zcuts.fits.gz b/py/picca/tests/data/test_cor/cf_zcuts.fits.gz index 46299d23f..2a68a97b1 100644 Binary files a/py/picca/tests/data/test_cor/cf_zcuts.fits.gz and b/py/picca/tests/data/test_cor/cf_zcuts.fits.gz differ diff --git a/py/picca/tests/data/test_cor/cf_zcuts_image.fits.gz b/py/picca/tests/data/test_cor/cf_zcuts_image.fits.gz deleted file mode 100644 index 2cd8fc071..000000000 Binary files a/py/picca/tests/data/test_cor/cf_zcuts_image.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/dmat_cross_zcuts.fits.gz b/py/picca/tests/data/test_cor/dmat_cross_zcuts.fits.gz index 80eba7c85..335f5dca5 100644 Binary files a/py/picca/tests/data/test_cor/dmat_cross_zcuts.fits.gz and b/py/picca/tests/data/test_cor/dmat_cross_zcuts.fits.gz differ diff --git a/py/picca/tests/data/test_cor/dmat_zcuts.fits.gz b/py/picca/tests/data/test_cor/dmat_zcuts.fits.gz index be8afa7e6..e412aa28f 100644 Binary files a/py/picca/tests/data/test_cor/dmat_zcuts.fits.gz and b/py/picca/tests/data/test_cor/dmat_zcuts.fits.gz differ diff --git a/py/picca/tests/data/test_cor/fast_metal_dmat_cross_zcuts.fits.gz b/py/picca/tests/data/test_cor/fast_metal_dmat_cross_zcuts.fits.gz deleted file mode 100644 index ce54c5943..000000000 Binary files a/py/picca/tests/data/test_cor/fast_metal_dmat_cross_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/fast_metal_dmat_zcuts.fits.gz b/py/picca/tests/data/test_cor/fast_metal_dmat_zcuts.fits.gz deleted file mode 100644 index d6abafc54..000000000 Binary files a/py/picca/tests/data/test_cor/fast_metal_dmat_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/metal_dmat_cross_zcuts.fits.gz b/py/picca/tests/data/test_cor/metal_dmat_cross_zcuts.fits.gz deleted file mode 100644 index 208dd47cb..000000000 Binary files a/py/picca/tests/data/test_cor/metal_dmat_cross_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/metal_dmat_zcuts.fits.gz b/py/picca/tests/data/test_cor/metal_dmat_zcuts.fits.gz deleted file mode 100644 index f5e925dbb..000000000 Binary files a/py/picca/tests/data/test_cor/metal_dmat_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/metal_xdmat_zcuts.fits.gz b/py/picca/tests/data/test_cor/metal_xdmat_zcuts.fits.gz deleted file mode 100644 index c6725a6e3..000000000 Binary files a/py/picca/tests/data/test_cor/metal_xdmat_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/wick_zcuts.fits.gz b/py/picca/tests/data/test_cor/wick_zcuts.fits.gz deleted file mode 100644 index 32afba89f..000000000 Binary files a/py/picca/tests/data/test_cor/wick_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/xcf.fits.gz b/py/picca/tests/data/test_cor/xcf.fits.gz index b7ad4d780..bd298578f 100644 Binary files a/py/picca/tests/data/test_cor/xcf.fits.gz and b/py/picca/tests/data/test_cor/xcf.fits.gz differ diff --git a/py/picca/tests/data/test_cor/xcf_angl_zcuts.fits.gz b/py/picca/tests/data/test_cor/xcf_angl_zcuts.fits.gz deleted file mode 100644 index d55309563..000000000 Binary files a/py/picca/tests/data/test_cor/xcf_angl_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/data/test_cor/xcf_zcuts.fits.gz b/py/picca/tests/data/test_cor/xcf_zcuts.fits.gz index 85f2a105d..9d77cd1a3 100644 Binary files a/py/picca/tests/data/test_cor/xcf_zcuts.fits.gz and b/py/picca/tests/data/test_cor/xcf_zcuts.fits.gz differ diff --git a/py/picca/tests/data/test_cor/xdmat_zcuts.fits.gz b/py/picca/tests/data/test_cor/xdmat_zcuts.fits.gz index 5213fd70b..1ce70599b 100644 Binary files a/py/picca/tests/data/test_cor/xdmat_zcuts.fits.gz and b/py/picca/tests/data/test_cor/xdmat_zcuts.fits.gz differ diff --git a/py/picca/tests/data/test_cor/xwick_zcuts.fits.gz b/py/picca/tests/data/test_cor/xwick_zcuts.fits.gz deleted file mode 100644 index 7fb872c60..000000000 Binary files a/py/picca/tests/data/test_cor/xwick_zcuts.fits.gz and /dev/null differ diff --git a/py/picca/tests/test_3_cor.py b/py/picca/tests/test_3_cor.py index e62d54e9c..38b8b7cad 100644 --- a/py/picca/tests/test_3_cor.py +++ b/py/picca/tests/test_3_cor.py @@ -44,8 +44,8 @@ def reset_cf(): picca.cf.num_model_bins_r_par = None picca.cf.r_par_max = None picca.cf.r_par_min = None - picca.cf.z_cut_max = None - picca.cf.z_cut_min = None + picca.cf.z_min_pairs = None + picca.cf.z_max_pairs = None picca.cf.r_trans_max = None picca.cf.ang_max = None picca.cf.nside = None @@ -92,9 +92,9 @@ def reset_xcf(): picca.xcf.num_model_bins_r_trans = None picca.xcf.r_par_max = None picca.xcf.r_par_min = None + picca.xcf.z_min_pairs = None + picca.xcf.z_max_pairs = None picca.xcf.r_trans_max = None - picca.xcf.z_cut_max = None - picca.xcf.z_cut_min = None picca.xcf.ang_max = None picca.xcf.nside = None @@ -771,32 +771,6 @@ def test_xwick(self): return - def test_cf_angl_zcuts(self): - """ - Test angular correlation function - """ - importlib.reload(picca.cf) - userprint("\n") - ### Send - cmd = "picca_cf_angl.py" - cmd += " --in-dir " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --out " + self._branchFiles + "/Products/Correlations/cf_angl_zcuts.fits.gz" - cmd += " --nproc 1" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_cf_angl.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/cf_angl_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/cf_angl_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_cf_angl.py") - - return - def test_cf_zcuts(self): """ Test correlation function @@ -815,8 +789,8 @@ def test_cf_zcuts(self): cmd += " --nt 15" cmd += " --nproc 1" cmd += ' --remove-same-half-plate-close-pairs' - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" + cmd += " --z-min-pairs 2.25" + cmd += " --z-max-pairs 2.3" cmd += " --z-min-sources 2.3" cmd += " --z-max-sources 2.5" print(repr(cmd)) @@ -847,8 +821,8 @@ def test_cf_image_data_zcuts(self): cmd += " --np 15" cmd += " --nt 15" cmd += " --nproc 1" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" + cmd += " --z-min-pairs 2.25" + cmd += " --z-max-pairs 2.3" cmd += " --z-min-sources 2.3" cmd += " --z-max-sources 2.5" print(repr(cmd)) @@ -881,8 +855,8 @@ def test_dmat_zcuts(self): cmd += " --rej 0.99" cmd += " --nproc 1" cmd += ' --remove-same-half-plate-close-pairs' - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" + cmd += " --z-min-pairs 2.25" + cmd += " --z-max-pairs 2.3" cmd += " --z-min-sources 2.3" cmd += " --z-max-sources 2.5" cmd += ' --no-redshift-evolution' @@ -898,107 +872,6 @@ def test_dmat_zcuts(self): return - def test_metal_dmat_zcuts(self): - """ - Test metal distortion matrix - """ - importlib.reload(picca.cf) - - userprint("\n") - ### Send - cmd = "picca_metal_dmat.py" - cmd += " --in-dir " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --out " + self._branchFiles + "/Products/Correlations/metal_dmat_zcuts.fits.gz" - cmd += r" --abs-igm SiIII(1207)" - cmd += " --rp-min +0.0" - cmd += " --rp-max +60.0" - cmd += " --rt-max +60.0" - cmd += " --np 15" - cmd += " --nt 15" - cmd += " --rej 0.99" - cmd += " --nproc 1" - cmd += ' --remove-same-half-plate-close-pairs' - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_metal_dmat.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/metal_dmat_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/metal_dmat_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_metal_dmat.py") - - return - - def test_fast_metal_dmat_zcuts(self): - """ - Test metal distortion matrix - """ - importlib.reload(picca.cf) - - userprint("\n") - ### Send - cmd = "picca_metal_dmat.py" - cmd += " --in-attributes " + self._masterFiles + "/test_cor/input_from_delta_extraction_lya_nodla/Log/delta_attributes.fits.gz" - cmd += " --out " + self._branchFiles + "/Products/Correlations/fast_metal_dmat_zcuts.fits.gz" - cmd += r" --abs-igm SiIII(1207)" - cmd += " --rp-min +0.0" - cmd += " --rp-max +60.0" - cmd += " --rt-max +60.0" - cmd += " --np 15" - cmd += " --nt 15" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_fast_metal_dmat.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/fast_metal_dmat_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/fast_metal_dmat_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_fast_metal_dmat.py") - - return - - def test_wick_zcuts(self): - """ - Test wick covariances - """ - importlib.reload(picca.cf) - - userprint("\n") - ### Send - cmd = "picca_wick.py" - cmd += " --in-dir " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --out " + self._branchFiles + "/Products/Correlations/wick_zcuts.fits.gz" - cmd += " --cf1d " + self._masterFiles + "/test_cor/cf1d.fits.gz" - cmd += " --rp-min +0.0" - cmd += " --rp-max +60.0" - cmd += " --rt-max +60.0" - cmd += " --np 15" - cmd += " --nt 15" - cmd += " --rej 0.99" - cmd += " --nproc 1" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_wick.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/wick_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/wick_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_wick.py") - - return - def test_cf_cross_zcuts(self): """ Test export of cross correlation function @@ -1019,8 +892,8 @@ def test_cf_cross_zcuts(self): cmd += " --nproc 1" cmd += ' --remove-same-half-plate-close-pairs' cmd += " --unfold-cf" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" + cmd += " --z-min-pairs 2.25" + cmd += " --z-max-pairs 2.3" cmd += " --z-min-sources 2.3" cmd += " --z-max-sources 2.5" print(repr(cmd)) @@ -1040,7 +913,6 @@ def test_dmat_cross_zcuts(self): """ importlib.reload(picca.cf) - userprint("\n") ### Send cmd = "picca_dmat.py" @@ -1056,8 +928,8 @@ def test_dmat_cross_zcuts(self): cmd += " --nproc 1" cmd += ' --remove-same-half-plate-close-pairs' cmd += " --unfold-cf" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" + cmd += " --z-min-pairs 2.25" + cmd += " --z-max-pairs 2.3" cmd += " --z-min-sources 2.3" cmd += " --z-max-sources 2.5" cmd += ' --no-redshift-evolution' @@ -1073,109 +945,6 @@ def test_dmat_cross_zcuts(self): return - def test_metal_dmat_cross_zcuts(self): - """ - Test metal cross distortion matrix - """ - importlib.reload(picca.cf) - - userprint("\n") - ### Send - cmd = "picca_metal_dmat.py" - cmd += " --in-dir " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --in-dir2 " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --out " + self._branchFiles + \ - "/Products/Correlations/metal_dmat_cross_zcuts.fits.gz" - cmd += r" --abs-igm SiIII(1207)" - cmd += r" --abs-igm2 SiIII(1207)" - cmd += " --rp-min -60.0" - cmd += " --rp-max +60.0" - cmd += " --rt-max +60.0" - cmd += " --np 30" - cmd += " --nt 15" - cmd += " --rej 0.99" - cmd += " --nproc 1" - cmd += ' --remove-same-half-plate-close-pairs' - cmd += " --unfold-cf" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_metal_dmat.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/metal_dmat_cross_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/metal_dmat_cross_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_metal_dmat.py") - - return - - def test_fast_metal_dmat_cross_zcuts(self): - """ - Test metal cross distortion matrix - """ - importlib.reload(picca.cf) - - userprint("\n") - ### Send - cmd = "picca_fast_metal_dmat.py" - cmd += " --in-attributes " + self._masterFiles + "/test_cor/input_from_delta_extraction_lya_nodla/Log/delta_attributes.fits.gz" - cmd += " --in-attributes2 " + self._masterFiles + "/test_cor/input_from_delta_extraction_lya_nodla/Log/delta_attributes.fits.gz" - cmd += " --out " + self._branchFiles + \ - "/Products/Correlations/fast_metal_dmat_cross_zcuts.fits.gz" - cmd += r" --abs-igm SiIII(1207)" - cmd += r" --abs-igm2 SiIII(1207)" - cmd += " --rp-min -60.0" - cmd += " --rp-max +60.0" - cmd += " --rt-max +60.0" - cmd += " --np 30" - cmd += " --nt 15" - cmd += " --unfold-cf" - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_fast_metal_dmat.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/fast_metal_dmat_cross_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/fast_metal_dmat_cross_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_fast_metal_dmat.py") - - return - - def test_xcf_angl_zcuts(self): - """ - Test angular cross correlation function - """ - - userprint("\n") - ### Send - cmd = "picca_xcf_angl.py" - cmd += " --in-dir " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --drq " + self._masterFiles + "/test_delta/cat.fits" - cmd += " --out " + self._branchFiles + "/Products/Correlations/xcf_angl_zcuts.fits.gz" - cmd += " --nproc 1" - cmd += " --z-evol-obj 1." - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_xcf_angl.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/xcf_angl_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/xcf_angl_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_xcf_angl.py") - - return - def test_xcf_zcuts(self): """ Test cross correlation function @@ -1194,8 +963,8 @@ def test_xcf_zcuts(self): cmd += " --nt 15" cmd += " --nproc 1" cmd += " --z-evol-obj 1." - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" + cmd += " --z-min-pairs 2.25" + cmd += " --z-max-pairs 2.3" cmd += " --z-min-sources 2.3" cmd += " --z-max-sources 2.5" print(repr(cmd)) @@ -1215,7 +984,6 @@ def test_xdmat_zcuts(self): """ importlib.reload(picca.xcf) - userprint("\n") ### Send cmd = "picca_xdmat.py" @@ -1230,8 +998,8 @@ def test_xdmat_zcuts(self): cmd += " --rej 0.99" cmd += " --nproc 1" cmd += " --z-evol-obj 1." - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" + cmd += " --z-min-pairs 2.25" + cmd += " --z-max-pairs 2.3" cmd += " --z-min-sources 2.3" cmd += " --z-max-sources 2.5" cmd += ' --no-redshift-evolution' @@ -1246,75 +1014,6 @@ def test_xdmat_zcuts(self): return - def test_metal_xdmat_zcuts(self): - """ - Test metal cross distortion matrix - """ - userprint("\n") - ### Send - cmd = "picca_metal_xdmat.py" - cmd += " --in-dir " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --drq " + self._masterFiles + "/test_delta/cat.fits" - cmd += " --out " + self._branchFiles + "/Products/Correlations/metal_xdmat_zcuts.fits.gz" - cmd += r" --abs-igm SiIII(1207)" - cmd += " --rp-min -60.0" - cmd += " --rp-max +60.0" - cmd += " --rt-max +60.0" - cmd += " --np 30" - cmd += " --nt 15" - cmd += " --rej 0.99" - cmd += " --nproc 1" - cmd += " --z-evol-obj 1." - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_metal_xdmat.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/metal_xdmat_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/metal_xdmat_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_metal_xdmat.py") - - return - - def test_xwick_zcuts(self): - """ - Test wick covariances for cross - """ - - userprint("\n") - ### Send - cmd = "picca_xwick.py" - cmd += " --in-dir " + self._masterFiles + "/test_delta/Delta_LYA/" - cmd += " --drq " + self._masterFiles + "/test_delta/cat.fits" - cmd += " --out " + self._branchFiles + "/Products/Correlations/xwick_zcuts.fits.gz" - cmd += " --cf1d " + self._masterFiles + "/test_cor/cf1d.fits.gz" - cmd += " --rp-min -60.0" - cmd += " --rp-max +60.0" - cmd += " --rt-max +60.0" - cmd += " --np 30" - cmd += " --nt 15" - cmd += " --rej 0.99" - cmd += " --nproc 1" - cmd += " --z-evol-obj 1." - cmd += " --z-cut-min 2.25" - cmd += " --z-cut-max 2.3" - cmd += " --z-min-sources 2.3" - cmd += " --z-max-sources 2.5" - print(repr(cmd)) - picca.bin.picca_xwick.main(cmd.split()[1:]) - - ### Test - if self._test: - path1 = self._masterFiles + "/test_cor/xwick_zcuts.fits.gz" - path2 = self._branchFiles + "/Products/Correlations/xwick_zcuts.fits.gz" - self.compare_fits(path1, path2, "picca_xwick.py") - - return - def test_export_xcf(self): """ Test the export of the cross correlation function diff --git a/py/picca/xcf.py b/py/picca/xcf.py index 8d1d65dcd..d3cc91cd3 100644 --- a/py/picca/xcf.py +++ b/py/picca/xcf.py @@ -31,8 +31,6 @@ r_par_max = None r_par_min = None r_trans_max = None -z_cut_max = None -z_cut_min = None z_min_pairs = None z_max_pairs = None ang_max = None @@ -122,17 +120,7 @@ def fill_neighs(healpixs): w &= (delta.r_comov[0] - r_comov) * np.cos(ang / 2.) < r_par_max * f w &= (delta.r_comov[-1] - r_comov) * np.cos(ang / 2.) > r_par_min * f - neighbours = np.array(neighbours)[w] - delta.neighbours = np.array( - [ - obj - for obj in neighbours - if ( - (delta.z[-1] + obj.z_qso) / 2.0 >= z_cut_min - and (delta.z[-1] + obj.z_qso) / 2.0 < z_cut_max - ) - ] - ) + delta.neighbours = np.array(neighbours)[w] def compute_xi(healpixs):