-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsfft_one_sn_hackathon.py
35 lines (25 loc) · 1.13 KB
/
sfft_one_sn_hackathon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import nvtx
from phrosty.utils import set_logger
import preprocess
import sfftdiff
import postprocess
import mk_lc
sne = [ '20172782' ]
bands = [ 'R062' ]
ncpus = 1
logger = set_logger( "wrapper", "wrapper" )
for sn in sne:
for band in bands:
logger.info( f"*** Running preprocess for {sn} {band}" )
with nvtx.annotate( "preprocess", color=0x0000ff ):
preprocess.run( sn, band, n_templates=1, verbose=True, cpus_per_task=ncpus )
logger.info( f"*** Running sfftdiff for {sn} {band}" )
with nvtx.annotate( "sfftdiff", color="green" ):
sfftdiff.run( sn, band, n_templates=1, verbose=True )
logger.info( f"*** Running postprocess for {sn} {band} : {postprocess.__file__}" )
with nvtx.annotate( "postprocess", color=0x0000ff ):
postprocess.run( sn, band, n_templates=1, verbose=True, cpus_per_task=ncpus )
# logger.info( f"*** Running mk_lc for {sn} {band}" )
# with nvtx.annotate( "mk_lc", color="violet" ):
# mk_lc.run( sn, band, n_templates=1, verbose=True, cpus_per_task=ncpus )
logger.info( f"*** Done with {sn} {band}" )