You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromastropy.ioimportfits# Access to FITS (Flexible Image Transport System) files.
2
+
fromastropy.tableimportTable, hstack, vstack, Column# A class to represent tables of heterogeneous data.
3
+
importfitsio
4
+
importnumpyasnp
5
+
importglob
6
+
importos
7
+
importhealpyashp
8
+
importargparse
9
+
importsys
10
+
11
+
12
+
defradec2thphi(ra,dec):
13
+
return (-dec+90.)*np.pi/180.,ra*np.pi/180.
14
+
15
+
16
+
ifos.environ['NERSC_HOST'] =='cori':
17
+
scratch='CSCRATCH'
18
+
elifos.environ['NERSC_HOST'] =='perlmutter':
19
+
scratch='PSCRATCH'
20
+
else:
21
+
print('NERSC_HOST is not cori or permutter but is '+os.environ['NERSC_HOST'])
22
+
sys.exit('NERSC_HOST not known (code only works on NERSC), not proceeding')
23
+
24
+
25
+
parser=argparse.ArgumentParser()
26
+
parser.add_argument("--tracer", help="tracer type to use",choices=['LRG','ELG_LOPnotqso','QSO','BGS_BRIGHT'],default='LRG')
27
+
parser.add_argument("--mocktype", help="type of mock to use",choices=['Ab','EZ','EZ2gpc'],default='EZ')
28
+
parser.add_argument("--mockversion", help="version of mock type ",choices=['1stgen'],default='1stgen')
29
+
#parser.add_argument("--mockpath", help="Location of mock file(s)",default='/global/cfs/cdirs/desi/cosmosim/FirstGenMocks/AbacusSummit/CutSky/')
30
+
#parser.add_argument("--mockfile", help="formattable name of mock file(s). e.g. cutsky_{TYPE}_{Z}_AbacusSummit_base_c000_ph{PH}.fits. TYPE will be replaced with tracer type. PH will be replaced with realization number for simulation of mock.",default='cutsky_{TYPE}_{Z}_AbacusSummit_base_c000_ph{PH}.fits')
31
+
parser.add_argument("--real", help="number for the realization",default=1,type=int)
32
+
#parser.add_argument("--survey", help="points to set of tiles",default='Y1')
0 commit comments