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

Second Generation implementation #109

Open
wants to merge 314 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
314 commits
Select commit Hold shift + click to select a range
95adb77
Create sysnetprep_ffa2clus.sh
ashleyjross Sep 27, 2023
39acaee
changed the WEIGHT names
Jiaxi-Yu Sep 27, 2023
851bb5a
updated the binomial error for SSR trends
Jiaxi-Yu Sep 27, 2023
dd3d69e
Create all_LRGsysnet_zbins.txt
ashleyjross Sep 27, 2023
556b92e
option=elgzcatas means to mask 1.31<z<1.33 of Y1 ELGs suffering from …
Jiaxi-Yu Oct 5, 2023
abedc2e
add choices for --option ['elgzmask','elgzcatas']
Jiaxi-Yu Oct 5, 2023
40421c1
LRG sysnet running of mocks
ashleyjross Sep 27, 2023
c0cae5f
Update Y1ab2ndgen_sysnet_tracer_zbin.sh
ashleyjross Sep 27, 2023
8e4f4b6
Update Y1ab2ndgen_sysnet_tracer_zbin.sh
ashleyjross Sep 28, 2023
530a859
Update run_sysnet_ab2ndgen.sh
ashleyjross Sep 28, 2023
e1156e0
Update run_sysnet_ab2ndgen.sh
ashleyjross Sep 28, 2023
9023d53
Create all_LRGsysnet_zbin3_test.txt
ashleyjross Sep 28, 2023
d315104
Update all_LRGsysnet_zbin3.txt
ashleyjross Sep 28, 2023
ea3fe49
Update all_LRGsysnet_zbin3_test.txt
ashleyjross Sep 28, 2023
512d522
Update all_LRGsysnet_zbin3_test.txt
ashleyjross Sep 28, 2023
d90c65c
bash scripts
ashleyjross Sep 28, 2023
4c8231d
Update Y1ab2ndgen_sysnet_tracer_zbin.sh
ashleyjross Sep 28, 2023
5e2804a
Update run_sysnet_ab2ndgen.sh
ashleyjross Sep 28, 2023
f7a8114
Create ab_xi_tracer_ffa.sh
ashleyjross Sep 28, 2023
aa22e52
Update all_LRGsysnet_zbin3_test.txt
ashleyjross Oct 2, 2023
ae6305c
Create submit_ab2ndgen_LRG_ffa_sysnet_zbin.py
ashleyjross Oct 2, 2023
5bc5695
Update submit_ab2ndgen_LRG_ffa_sysnet_zbin.py
ashleyjross Oct 2, 2023
d082847
Update ffa2clus.py
ashleyjross Oct 2, 2023
89d5941
Update ffa2clus.py
ashleyjross Oct 2, 2023
27f5515
Update all_LRGsysnet_zbin1.txt
ashleyjross Oct 2, 2023
be4a32b
Update all_LRGsysnet_zbin1.txt
ashleyjross Oct 2, 2023
82d42c7
Update ffa2clus.py
ashleyjross Oct 2, 2023
a5278ef
Update ffa2clus.py
ashleyjross Oct 2, 2023
0095ee7
Create all_LRGffa_addsysnet.txt
ashleyjross Oct 3, 2023
bc0c6fe
scripts for running mock xi
ashleyjross Oct 3, 2023
224df85
Update regressis_tools.py
ashleyjross Oct 3, 2023
1d487f4
Update regressis_tools.py
ashleyjross Oct 3, 2023
8c4b3a3
Update ffa2clus.py
ashleyjross Oct 3, 2023
ff7d6b0
Create compAbmock_data.py
ashleyjross Oct 4, 2023
83fd411
Update compAbmock_data.py
ashleyjross Oct 4, 2023
873f859
Update compAbmock_data.py
ashleyjross Oct 4, 2023
bbb6f49
Update compAbmock_data.py
ashleyjross Oct 4, 2023
3a9bb7a
Update compAbmock_data.py
ashleyjross Oct 4, 2023
14c2074
Update compAbmock_data.py
ashleyjross Oct 4, 2023
b6219c4
Update compAbmock_data.py
ashleyjross Oct 4, 2023
8446b75
Create ab_pk_ffa_rpcutandnot_alltypes.sh
ashleyjross Oct 6, 2023
3dd9289
Update ab_pk_ffa_rpcutandnot_alltypes.sh
ashleyjross Oct 6, 2023
36f75d8
Update pkrun.py
ashleyjross Oct 6, 2023
0b1dc2e
Update pkrun.py
ashleyjross Oct 6, 2023
680a5ad
Update pkrun.py
ashleyjross Oct 6, 2023
7d1e69a
Update ffa2clus.py
ashleyjross Oct 6, 2023
cbe62be
Create ab_pk_ffa_norpcut_alltypes.sh
ashleyjross Oct 6, 2023
25dafd9
Update xirunpc.py
ashleyjross Oct 6, 2023
1d3a0fa
use -n 64 for pk
ashleyjross Oct 6, 2023
b2008f7
Create ab_pk_ffa_rpcut_alltypes.sh
ashleyjross Oct 6, 2023
ad3c37a
Update mkCat_main.py
ashleyjross Oct 7, 2023
4adb629
Create Y1_custom_sysnet_tracer_zbin.sh
ashleyjross Oct 7, 2023
a62c080
Update Y1_custom_sysnet_tracer_zbin.sh
ashleyjross Oct 7, 2023
103c544
Update Y1_custom_sysnet_tracer_zbin.sh
ashleyjross Oct 7, 2023
7921458
Update Y1_custom_sysnet_tracer_zbin.sh
ashleyjross Oct 7, 2023
b90ebcb
Update run_sysnet_cd.sh
ashleyjross Oct 7, 2023
8c52900
Update validation_improp_full.py
ashleyjross Oct 7, 2023
f8aba35
Update validation_improp_full.py
ashleyjross Oct 7, 2023
83919dc
Update validation_improp_full.py
ashleyjross Oct 7, 2023
60c3b06
Update validation_improp_full.py
ashleyjross Oct 7, 2023
241fecc
Update validation_improp_full.py
ashleyjross Oct 7, 2023
506e9b8
Update validation_improp_full.py
ashleyjross Oct 7, 2023
b177cf0
Update validation_improp_full.py
ashleyjross Oct 7, 2023
2bfc2d0
Update validation_improp_full.py
ashleyjross Oct 7, 2023
692ad16
Update validation_improp_full.py
ashleyjross Oct 7, 2023
08a9151
Update LSSpipe_imagingweights.txt
ashleyjross Oct 7, 2023
0bd7825
Update pkrun.py
ashleyjross Oct 8, 2023
2b83d51
Update add_col_2clus.py
ashleyjross Oct 8, 2023
fe01209
Update add_col_2clus.py
ashleyjross Oct 8, 2023
7277e93
Update globals.py
ashleyjross Oct 9, 2023
8beec12
Update mkCat_main.py
ashleyjross Oct 9, 2023
54f5adf
Update common_tools.py
ashleyjross Oct 9, 2023
38f49a1
Update add_col_2clus.py
ashleyjross Oct 9, 2023
a3b0211
Update add_col_2clus.py
ashleyjross Oct 9, 2023
c2c0044
Update add_col_2clus.py
ashleyjross Oct 9, 2023
54367d4
the 2D fibrewise SSR for Y1 LRGs, BGS, QSOs and ELGs
Jiaxi-Yu Oct 10, 2023
a167fb9
Update validation_improp_full.py
ashleyjross Oct 10, 2023
b064312
Create normRFweights.py
ashleyjross Oct 10, 2023
fea7e35
Update normRFweights.py
ashleyjross Oct 11, 2023
22a4d08
linear fits for imaging systematics
ashleyjross Oct 12, 2023
951d841
Update mkCat_main.py
ashleyjross Oct 12, 2023
5b3353c
Update mkCat_main.py
ashleyjross Oct 12, 2023
82e596b
Update mkCat_main.py
ashleyjross Oct 12, 2023
367aee5
Update densvar.py
ashleyjross Oct 12, 2023
0017e26
Update densvar.py
ashleyjross Oct 12, 2023
e8703c8
Update densvar.py
ashleyjross Oct 12, 2023
2725c32
Update densvar.py
ashleyjross Oct 12, 2023
7230fc0
Update densvar.py
ashleyjross Oct 12, 2023
afc1012
Update densvar.py
ashleyjross Oct 12, 2023
4c5c21b
more fixes for linear systematic weights
ashleyjross Oct 12, 2023
d3f6cca
Update mkCat_main.py
ashleyjross Oct 12, 2023
476cc1e
Update mkCat_main.py
ashleyjross Oct 12, 2023
afbec85
Update densvar.py
ashleyjross Oct 12, 2023
1a26441
Update mkCat_main.py
ashleyjross Oct 12, 2023
14033e2
Update mkCat_main.py
ashleyjross Oct 12, 2023
682c40c
still fixing linear weights
ashleyjross Oct 12, 2023
9688770
Update densvar.py
ashleyjross Oct 12, 2023
a9ec609
Update mkCat_main.py
ashleyjross Oct 12, 2023
faa2e3a
Update mkCat_main.py
ashleyjross Oct 12, 2023
a8c2a62
Update mkCat_main.py
ashleyjross Oct 12, 2023
8734864
Update densvar.py
ashleyjross Oct 12, 2023
96371ce
Update cosmodesi_io_tools.py
ashleyjross Oct 12, 2023
558a575
imaging systematics updates for data/mocks
ashleyjross Oct 12, 2023
9c243d8
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
2ff7c0b
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
e788445
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
f7c6ff2
correct makedirs
ashleyjross Oct 12, 2023
1f95c5a
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
d2227bc
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
0d0ffa8
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
3ca24b1
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
f01e8f7
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
97bf96a
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
91f2995
Update validation_improp_mock.py
ashleyjross Oct 12, 2023
f17c0d3
Create LRGimproplist.txt
ashleyjross Oct 12, 2023
0ee61e0
Update validation_improp_full.py
ashleyjross Oct 13, 2023
87166d2
Update LRGimproplist.txt
ashleyjross Oct 16, 2023
4e0bcad
Update getpotaY1_mock.py
ashleyjross Oct 16, 2023
34a93f0
Update LRGimproplist.txt
ashleyjross Oct 16, 2023
cc98cb4
Create ELGimproplist.txt
ashleyjross Oct 16, 2023
b09c575
Update ELGimproplist.txt
ashleyjross Oct 16, 2023
177c56d
Update mkCat_main_ran.py
ashleyjross Oct 17, 2023
3bb969b
Update mkCat_main_ran.py
ashleyjross Oct 17, 2023
671e1a0
Update LSSpipe_Y1.txt
ashleyjross Oct 17, 2023
3c7eb81
Update LSSpipe_Y1.txt
ashleyjross Oct 17, 2023
a647b63
apply priority cut before running TSNR cut in QSO
Oct 17, 2023
5796309
Update addsys.py
ashleyjross Oct 17, 2023
cee5bb2
Update ELGimproplist.txt
ashleyjross Oct 18, 2023
e35583c
Clone original file from scripts/main/apply_blinding_main_fromfile_fc…
Uendert Oct 18, 2023
44c139c
Refactor blinding script for double blinding approach
Uendert Oct 18, 2023
009c5a7
Create QSOimproplist.txt
ashleyjross Oct 18, 2023
718042a
Update QSOimproplist.txt
ashleyjross Oct 19, 2023
792092a
Update QSOimproplist.txt
ashleyjross Oct 19, 2023
a594e31
Update QSOimproplist.txt
ashleyjross Oct 19, 2023
cc06879
Update common_tools.py
ashleyjross Oct 19, 2023
ccfc2eb
Update ffa2clus.py
ashleyjross Oct 19, 2023
48d5bc3
Update QSOimproplist.txt
ashleyjross Oct 20, 2023
c655e0f
Update addsys.py
ashleyjross Oct 20, 2023
0402ca8
Update validation_improp_mock.py
ashleyjross Oct 20, 2023
fff8c96
Update QSOimproplist.txt
ashleyjross Oct 20, 2023
5a4a4e4
Create all_QSOffa_addsysnet.txt
ashleyjross Oct 21, 2023
f88032d
added mock capability to validation_ssr_plot
Oct 23, 2023
7ceb7d0
Update LSSpipe_imagingweights.txt
ashleyjross Oct 25, 2023
a919582
don't split clustering catalogs N/S (re-sample internally instead)
ashleyjross Oct 27, 2023
cdeafb7
Update cattools.py
ashleyjross Oct 27, 2023
8fdcfdb
Update apply_blinding_main_fromfile_fcomp.py
ashleyjross Oct 27, 2023
2f8f95b
Update cattools.py
ashleyjross Oct 27, 2023
1386a68
Update cattools.py
ashleyjross Oct 27, 2023
3e63ed6
Update cattools.py
ashleyjross Oct 28, 2023
c3afe61
Update cattools.py
ashleyjross Oct 28, 2023
143aa5a
Update apply_blinding_main_fromfile_fcomp.py
ashleyjross Oct 28, 2023
34d3e30
Update common_tools.py
ashleyjross Oct 28, 2023
f2d73c6
Update cattools.py
ashleyjross Oct 28, 2023
825e353
Update cattools.py
ashleyjross Oct 28, 2023
fac3966
Update combdata_main.py
ashleyjross Oct 28, 2023
e8c84fb
Update xirunpc.py
ashleyjross Oct 29, 2023
01be2e6
Update LSSpipe_Y1.txt
ashleyjross Oct 29, 2023
099b8b1
Update cattools.py
ashleyjross Oct 29, 2023
3be19c0
Update cattools.py
ashleyjross Oct 29, 2023
2b785fd
Update common_tools.py
ashleyjross Oct 30, 2023
cba4beb
Update common_tools.py
ashleyjross Oct 30, 2023
7c223be
Update common_tools.py
ashleyjross Oct 30, 2023
976dc1b
Update common_tools.py
ashleyjross Oct 30, 2023
8186cec
Update common_tools.py
ashleyjross Oct 30, 2023
ce2059a
Update common_tools.py
ashleyjross Oct 30, 2023
1780e50
Update common_tools.py
ashleyjross Oct 30, 2023
8e765a9
Update common_tools.py
ashleyjross Oct 30, 2023
4608604
Update cattools.py
ashleyjross Oct 30, 2023
23be0a7
Update common_tools.py
ashleyjross Oct 30, 2023
be10a86
Update common_tools.py
ashleyjross Oct 30, 2023
5b1df4a
Update common_tools.py
ashleyjross Oct 30, 2023
b319ff1
Update validation_improp_full.py
ashleyjross Oct 30, 2023
6450aa6
Update validation_improp_full.py
ashleyjross Oct 31, 2023
7de9b43
Update validation_improp_full.py
ashleyjross Oct 31, 2023
9ac4eab
Update validation_improp_full.py
ashleyjross Oct 31, 2023
58298a4
Update write_daily_stats.py
ashleyjross Nov 1, 2023
9f796a3
Update write_daily_stats.py
ashleyjross Nov 1, 2023
123ce6e
Update write_daily_stats.py
ashleyjross Nov 1, 2023
093e692
Update mkCat_main.py
ashleyjross Nov 1, 2023
55389b3
Create Y1_sysnetELG_zbins.sh
ashleyjross Nov 1, 2023
37247c3
Update Y1_sysnetELG_zbins.sh
ashleyjross Nov 1, 2023
faf6e8c
Update Y1_sysnetELG_zbins.sh
ashleyjross Nov 1, 2023
88d435b
Update apply_blinding_main_fromfile_fcomp_double_blinding.py
ashleyjross Nov 3, 2023
1552837
BGS CHANGES
mmsh-um Oct 31, 2023
d5d2d0a
Update mkCat_main.py
ashleyjross Nov 3, 2023
4bdbfd1
Update LSSpipe_Y1.txt
ashleyjross Nov 3, 2023
4481185
Update LSSpipe_Y1.txt
ashleyjross Nov 3, 2023
fc4a657
apply all vetos to mock randoms ones
ashleyjross Nov 4, 2023
946ce93
Update mkran_forffa.py
ashleyjross Nov 4, 2023
34d32bf
Update mkran_forffa.py
ashleyjross Nov 4, 2023
776208a
Update mkran_forffa.py
ashleyjross Nov 4, 2023
9d739a5
Update mkran_forffa.py
ashleyjross Nov 4, 2023
883f7b6
Update mkran_forffa.py
ashleyjross Nov 4, 2023
27fdba1
Update mkran_forffa.py
ashleyjross Nov 4, 2023
9fe5484
Update mkran_forffa.py
ashleyjross Nov 4, 2023
28bad02
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
1de29f4
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
ed6d681
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
7573c18
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
644088c
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
98502a2
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
bea0a35
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
8592214
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
25cd4ea
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
6365f2a
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
699d25a
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
5410146
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
b08b5d8
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
061e9ac
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
80334c9
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
ff82133
Update mkran_forffa.py
ashleyjross Nov 4, 2023
ba54f4d
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
bee235f
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
bf189ed
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
f3b64d7
Update ffa2clus_fast.py
ashleyjross Nov 4, 2023
d022a88
Update mkCat_main.py
ashleyjross Nov 4, 2023
d9a0674
Enhance double blinding bash script for readability and log management
Uendert Nov 5, 2023
c2ce5c3
Update pkrun.py
ashleyjross Nov 8, 2023
f5d084e
Update pkrun.py
ashleyjross Nov 8, 2023
f15c502
Update pkrun.py
ashleyjross Nov 8, 2023
cb0dc9d
Update pkrun.py
ashleyjross Nov 8, 2023
42c6583
Changes
aureliocarnero Sep 26, 2023
5310831
start changes
aureliocarnero Sep 12, 2023
d0ba25a
changes
aureliocarnero Sep 13, 2023
46b9976
Changes
aureliocarnero Sep 20, 2023
bc0e9a0
changes
aureliocarnero Sep 20, 2023
eae9c80
changes
aureliocarnero Sep 22, 2023
0c5d926
Changes
aureliocarnero Sep 26, 2023
f1912bd
start changes
aureliocarnero Sep 12, 2023
adb38a8
changes
aureliocarnero Sep 13, 2023
0296a5b
Changes
aureliocarnero Sep 20, 2023
11f1506
changes
aureliocarnero Sep 22, 2023
87c0853
doing parallel rea
aureliocarnero Oct 11, 2023
7f0e101
Adding more
aureliocarnero Oct 31, 2023
0c606ce
new file
aureliocarnero Oct 31, 2023
bb67037
moving testScript to scripts
aureliocarnero Oct 31, 2023
67007cc
Changes
aureliocarnero Nov 8, 2023
0a55101
Update LSSpipe_Y1mock_2ndgen.txt
aureliocarnero Nov 8, 2023
a6a3576
Update LSSpipe_Y1mock_2ndgen.txt
aureliocarnero Nov 8, 2023
04c96a8
Update LSSpipe_Y1mock_2ndgen.txt
aureliocarnero Nov 8, 2023
68c77eb
Update LSSpipe_Y1mock_2ndgen.txt
aureliocarnero Nov 13, 2023
993bd47
Create all_ab_amtl_tracer.sh
ashleyjross Nov 14, 2023
5990712
add +x for .sh
ashleyjross Nov 14, 2023
5175200
Update common_tools.py
ashleyjross Nov 14, 2023
fe2123c
Update all_ab_amtl_tracer.sh
ashleyjross Nov 14, 2023
99ac379
all
aureliocarnero Nov 14, 2023
c4817f2
changes
aureliocarnero Nov 14, 2023
9c9a40e
Merge branch 'main' into secondgen
ashleyjross Nov 14, 2023
70c8062
Update LSSpipe_Y1mock_2ndgen.txt
aureliocarnero Dec 19, 2023
b9a06f8
Update LSSpipe_Y1mock_2ndgen.txt
aureliocarnero Dec 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 129 additions & 8 deletions Sandbox/LSSpipe_Y1mock_2ndgen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,143 @@
#1st cutsky mocks get created from boxes and have the Y1 tiles list applied to geometry (Aurelio, others add details)
#These are combined across tracers, have columns added necessary for fiberassign, and have the targeting mask applied via
https://github.com/desihub/LSS/blob/main/scripts/mock_tools/prepare_mocks_Y1.py
#(Aurelio can add more details)

source /global/common/software/desi/desi_environment.sh main
PYTHONPATH=$PYTHONPATH:$HOME/LSS/py
#Set up
>> source /global/common/software/desi/desi_environment.sh main
In this documentation, $LSS is the directory where you have the LSS repository


#To run on the SecondGen Abacus mocks:

0) GOTO LSS/SCRIPTS/MOCK_TOOLS

1) PREPARE MOCKS FROM Abacus CutSKY:
>> ./prepare_script.sh [Should be made to run in batch several mocks at a time]
It executes a query like:
srun -N 1 -C cpu -t 04:00:00 -q interactive --account desi python prepare_mocks_Y1_dark.py --mockver ab_secondgen --mockpath /global/cfs/cdirs/desi/cosmosim/SecondGenMocks/AbacusSummit/CutSky_v3 --realmin 0 --realmax 2 --isProduction y --split_snapshot y --new_version AbacusSummit_v3_1

2) CREATE MATCH TO lrg_mask for LRGs
>> ./script_lrgmask_Y1.sh

3) CREATE FIBER COLLISION FILE AND CALCULATE POTA FILES
>> ./getpota_Y1_script.sh

### AltMTL + LSS pipeline INSTRUCTIONS ###

4) CREATE INITIAL LEDGERS
>> ./run_Y1SecondGen_initialledger_batch.sh

** Currently, you need to swap to branch ReprocessingAMTL in LSS and pip install . **

*) GOTO LSS/BIN

5) INITIALIZE ALTMTL DIRECTORY STRUCTURE FOR FIRST 1 MOCK
>> ./Y1ALTMTLRealizationsDARK_mock_init.sh

6) MAKE PARENT DIRECTORIES FOR OTHER REALIZATIONS
Right now this is a manual step, like
>> mkdir ./altmtl<MOCKNUMBER>/Univ000 for <MOCKNUMBER> between 1 and 24 (included)

7) COPY INITIAL LEDGERS TO ALTMTL RUN DIRECTORY AND COPY ECSV FILES
>> python initAMTL.py

8) MANUALLY ADD EXTRA TILES TO THE END OF mainsurvey-DARKobscon-TileTracker.ecsv
>> python /pscratch/sd/a/acarnero/codes/LSS/scripts/mock_tools/add_extra_tilesTracker.py

9) RUN ALTMTL PROCESS ON MOCK REALIZATIONS
This process runs on regular queue that takes 12 hours but to complete the operation we need more time. Therefore, it needs to be run at least twice
>> nohup ./Y1ALTMTLRealizationsDARK_mock.sh &

** If you want to leave the second process in the queue, once you start running the first, you can put a second process in the queue stating to start after this first process ends, with the option --dependency=afterany:<JOBID> in dateLoopAltMTLBugFix_mock_batch.sh
<JOBID> can be found with squeue -u <USER>

10) RUN A SECOND TIME
>> nohup ./Y1ALTMTLRealizationsDARK_mock.sh &







#Each realization can be passed through to find potential assignments, using the actual Y1 hardware specifications, via
#Add LRG veto, takes ~3 minutes per mock
>> srun -N 1 -C cpu -t 04:00:00 -q interactive --account desi python $LSS/scripts/readwrite_pixel_bitmask.py --tracer lrg -i <mock#> --cat_type Ab2ndgen

Right now is not parallelized over mock realizations, so you need to run each realization at a time (-i 0, -i 1, ...)
It directly save in /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/ for cat_type = Ab2ndgen (no overwritten)

#Each realization can be passed through to find potential assignments and collisions, using the actual Y1 hardware specifications, via
https://github.com/desihub/LSS/blob/main/scripts/getpotaY1_mock.py --realization <mock number>
srun -N 1 -C cpu -t 04:00:00 -q interactive --account desi python scripts/getpotaY1_mock.py --realization <mock#>
>> srun -N 1 -C cpu -t 04:00:00 -q interactive --account desi python scripts/getpotaY1_mock.py --realization <mock#>

Currently saves automatically on the production directory. It will overwrite the products, so be careful if running.

#The output will be all of the potential assignments from the mocks, for all tracers, and including all repeats
#Each takes ~20 minutes

#Add LRG veto, takes ~3 minutes per mock
srun -N 1 -C cpu -t 04:00:00 -q interactive --account desi python scripts/readwrite_pixel_bitmask.py --tracer lrg --input <mock#> --cat_type Ab2ndgen

# Now you have several pathways. Make clustering catalogs only from potential assigments (applying all the data masking) or mimic the entire data processing, staring from AltMTL to LSS pipeline.

### POTENTIAL ASSIGNMENT ONLY INSTRUCTIONS ###

PYTHONPATH=$PYTHONPATH:$HOME/LSS/py

#Make complete LSS catalogs with goodhardware and imaging veto masks applied
#Code does randoms in serial, 4 are likely enough
python scripts/mock_tools/pota2clus_simp.py --veto _gtlimaging --realization 0 --maxr <max_num_ran_needed>
>> python scripts/mock_tools/pota2clus_simp.py --veto _gtlimaging --realization 0 --maxr <max_num_ran_needed>

-----------------------------------------------


### AltMTL + LSS pipeline INSTRUCTIONS ###
## CAUTION: NO PIP WEIGHTS YET TESTED OR IMPLEMENTED ##

#The output directory names are just suggestions.
#Generate initial ledgers
# First define an output directory <base_output> (like in your scratch or if in production for obscon=dark, this is $DESI_ROOT/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit).

# Create initial ledgers and save hplist to feed MockAltMTL production, both saved in <base_output>/initial_ledger<mock#> (~20 minutes)
>> python $LSS/scripts/mock_tools/run_mtl_ledger.py $DESI_ROOT/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/forFA<mock#>.fits <base_output>/altmtl<mock#>/initled/ DARK

First need to create (mkdir) the directory <base_output>/altmtl<mock#>/initled
It will save the HP list in the same directory with the name hpxlist_<obscon>.txt

# Run AltMTL process (without generating bitweights yet) for 1 realization with $LSS/scripts/mock_tools/MockAltMTLScriptMain.sh (~24 hours)
# Modify by hand several options inside MockAltMTLScriptMain.sh
# This are the ones that you should worry (up to line 50. there are other options but you can ignore)
* mockNumber=<mock#> If running over production directories, set the realization here and can skip simName and targfile configuration.
* simName="<base_output>/altmtl<mock#>/initled/" This is the directory where to save all the AltMTL products for a given mock#
* path2LSS=/pscratch/sd/a/MYUSER/codes/LSS/bin/ This is the path to the LSS repo bin subdirectory
* ndir=1 Number of Alternative ledgers. In principle, we should run a single realization to get as data, and then another large run with ndir=128 or 256 to calculate PIP weights. If ndir = 1, then BitWeights are not calculated.
* obscon='DARK' Either DARK or BRIGHT
* endDate='--endDate=20220613' End date for Y1 campaign
* exampleLedgerBase=<base_output>/initial_ledger<mock#> This is the directory you indicated when creating the initial ledgers
* hpListFile="<base_output>/initial_ledger<mock#>/hpxlist_dark.txt" This is the hp file list created while running the initial ledgers
* targfile='--targfile=/global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/forFA<mock#>.fits' This is the path to the parent target sample

# This script takes quite some time to run (~24h). It generates ndir random realizations (given subpriority) and run fiber assigment creating potential assignments and assignments itself.
# Their outputs will serve as input for the LSS pipeline.


# Run LSS pipeline as follows.
# CAUTION: it has only been tested to run one mock by one mock with mockmin = 0 and mockmax = 1
# Prepare and combine data for dark or bright time data. Better run in batch mode since it might die in between if not running in batch mode.
# We don't need randoms at this stage any more. They will be read directly from data randoms when creating the full catalogs
>> srun -N 1 -C cpu -t 04:00:00 --qos interactive --account desi python $LSS/scripts/mock_tools/mkCat_SecondGen.py --base_output <base_output> --simName <base_output>/altmtl_main_rea{MOCKNUM} --mockver ab_secondgen --mockmin 0 --mockmax 1 --survey Y1 --add_gtl y --specdata iron --tracer dark --combd y

[40 minutes]

Example for mock = 1:
srun -N 1 -C cpu -t 04:00:00 --qos interactive --account desi python mkCat_SecondGen.py --base_output /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/altmtl1 --simName /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/altmtl1 --mockver ab_secondgen --mockmin 1 --mockmax 2 --survey Y1 --add_gtl y --specdata iron --tracer dark --combd y



# Create the full catalogs for data and randoms and apply vetos. Calcualte the FKP weights and make the clustering catalogs.
#LRG
>> srun -N 1 -C cpu -t 02:00:00 --qos interactive --account desi python mkCat_SecondGen.py --base_output /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/altmtl{MOCKNUM} --mockver ab_secondgen --mockmin 0 --mockmax 1 --survey Y1 --add_gtl y --specdata iron --tracer LRG --minr 0 --maxr 18 --fulld y --fullr y --apply_map_veto y --apply_veto y --use_map_veto _HPmapcut --mkclusran y --resamp y --nz y --getFKP y --mkclusdat y --targDir /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit

#ELG (ELG_LOP with notqso)
>> srun -N 1 -C cpu -t 02:00:00 --qos interactive --account desi python mkCat_SecondGen.py --base_output /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/altmtl{MOCKNUM} --mockver ab_secondgen --mockmin 0 --mockmax 1 --survey Y1 --add_gtl y --specdata iron --tracer ELG_LOP --notqso y --minr 0 --maxr 18 --fulld y --fullr y --apply_map_veto y --apply_veto y --use_map_veto _HPmapcut --mkclusran y --resamp y --nz y --getFKP y --mkclusdat y --targDir /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit

#QSO
>> srun -N 1 -C cpu -t 02:00:00 --qos interactive --account desi python mkCat_SecondGen.py --base_output /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit/altmtl{MOCKNUM} --mockver ab_secondgen --mockmin 0 --mockmax 1 --survey Y1 --add_gtl y --specdata iron --tracer QSO --minr 0 --maxr 18 --fulld y --fullr y --apply_map_veto y --apply_veto y --use_map_veto _HPmapcut --mkclusran y --resamp y --nz y --getFKP y --mkclusdat y --targDir /global/cfs/cdirs/desi/survey/catalogs/Y1/mocks/SecondGenMocks/AbacusSummit
131 changes: 0 additions & 131 deletions bin/InitializeAltMTLsParallel_mock.py

This file was deleted.

6 changes: 4 additions & 2 deletions bin/dateLoopAltMTL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ do
echo ""
echo ""

srun --nodes=$NNodes -C $CVal --qos=$QVal -A desi -t 02:00:00 $path2LSS/runAltMTLParallel.py $argstring
#$path2LSS/runAltMTLParallaure.py $argstring
#$path2LSS/runAltMTLParallel.py $argstring
srun --immediate=14400 --nodes=$NNodes -C $CVal --qos=$QVal -A desi -t 02:00:00 $path2LSS/runAltMTLParallel.py $argstring
retcode=$?
qR=0 #DO NOT CHANGE. This prevents further restarts after the first if qR is set to 1 at top.
if [ $retcode -ne 0 ]; then
Expand All @@ -39,4 +41,4 @@ do
exit 1234
fi

done
done
39 changes: 16 additions & 23 deletions bin/dateLoopAltMTL_mock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,21 @@
echo "All Arguments"
echo $@

NObsDates=$1

#Quick Restart (i.e. reset the MTLs by copying the saved original shuffled files).
#Default = 0/False. Set equal to 1 if you want to restart from the first observations
qR=$1
NNodes=$2

#Number of observation dates to loop through
NObsDates=$2
#Number of nodes to run on. This will launch up to 64*N jobs
#if that number of alternate universes have already been generated
NNodes=$3
path2LSS=$3

#Base directory for the alternate MTLs created in the InitializeAltMTLs script
altmtlbasedir=$4
CVal=$4

#Include secondary targets?
secondary=$5
QVal=$5

#Observing conditions to process the observations
obscon=$6
argstring=${@:6}

#Survey whose observations you are processing
survey=$7
echo 'argstring'
echo "$argstring"

numobs_from_ledger=$8

#Force redo fiber assignment if it has already been done.
redoFA=$9

for i in $(seq 0 1 $NObsDates)
do
Expand All @@ -41,10 +29,15 @@ do
echo ""
echo ""
echo ""
#srun runAltMTLParallel.py $i
srun --nodes=$NNodes -C haswell -A desi --qos=interactive -t 02:00:00 runAltMTLParallel_mock.py $NNodes $qR $altmtlbasedir $secondary $obscon $survey $numobs_from_ledger $redoFA

# $path2LSS/runAltMTLParallaure.py $argstring
srun --nodes=$NNodes -C $CVal --qos=$QVal -A desi -t 02:00:00 $path2LSS/runAltMTLRealizations.py $argstring
retcode=$?
qR=0 #DO NOT CHANGE. This prevents further restarts after the first if qR is set to 1 at top.
if [ $? -ne 0 ]; then
if [ $retcode -ne 0 ]; then
echo 'something went wrong'
echo $retcode
exit 1234
fi

done
1 change: 0 additions & 1 deletion bin/runAltMTLParallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from astropy.table import Table, vstack, join
#import altmtltools as amt
from desiutil.log import get_logger
import dill
from sys import argv
import os
import numpy as np
Expand Down
Loading