Skip to content

Commit

Permalink
Merge pull request #660 from igmhub/delta_from_transmission_gz
Browse files Browse the repository at this point in the history
read both .fits and .fits.gz files for transmission
  • Loading branch information
londumas authored Jul 11, 2019
2 parents bd7b088 + 18f9db5 commit bdf3550
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion py/picca/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,11 @@ def desi_convert_transmission_to_delta_files(zcat,outdir,indir=None,infiles=None
nest = h['METADATA'].read_header()['HPXNEST']
h.close()
in_pixs = healpy.ang2pix(in_nside, sp.pi/2.-zcat_dec, zcat_ra, nest=nest)
fi = sp.sort(sp.array(['{}/{}/{}/transmission-{}-{}.fits'.format(indir,int(f//100),f,in_nside,f) for f in sp.unique(in_pixs)]))
if fi[0].endswith('.gz'):
endoffile = '.gz'
else:
endoffile = ''
fi = sp.sort(sp.array(['{}/{}/{}/transmission-{}-{}.fits{}'.format(indir,int(f//100),f,in_nside,f,endoffile) for f in sp.unique(in_pixs)]))
else:
fi = sp.sort(sp.array(infiles))
print('INFO: Found {} files'.format(fi.size))
Expand Down

0 comments on commit bdf3550

Please sign in to comment.