Skip to content

Commit

Permalink
cleanup to make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Mar 13, 2020
1 parent dae128c commit 984a15b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 20 deletions.
10 changes: 5 additions & 5 deletions compress_decam.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@

from astropy.io import fits
import glob
import numpy as np
import os.path
import subprocess

files = glob.glob("hits2015-zeroed/*.fits")
files = glob.glob("hits2015/*.fits")
for file in files:
newfile = os.path.join("compressed", os.path.basename(file))
newfile = os.path.join("hits2015-zeroed", os.path.basename(file))
data = fits.open(file)
print("Processing:", file)
for i, hdu in enumerate(data):
if isinstance(hdu, fits.ImageHDU) or isinstance(hdu, fits.CompImageHDU):
hdu.data[:] = i
hdu.data.dtype = np.int32
print("Blanked Image HDUs...")
data.writeto(newfile, overwrite=True)
import ipdb; ipdb.set_trace();
with open(newfile, 'wb') as outfile:
data.writeto(outfile, overwrite=True)
print("Wrote file...")
# fpack the file, using gzip and "-q 0" because it did better than the
# other options when I did a comparison test.
Expand Down
4 changes: 2 additions & 2 deletions hits2015-zeroed/c4d_150218_052850_ori.fits.fz
Git LFS file not shown
4 changes: 2 additions & 2 deletions hits2015-zeroed/c4d_150218_070619_ori.fits.fz
Git LFS file not shown
4 changes: 2 additions & 2 deletions hits2015-zeroed/c4d_150309_055748_ori.fits.fz
Git LFS file not shown
1 change: 1 addition & 0 deletions ingested/_mapper
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lsst.obs.decam.decamMapper.DecamMapper
9 changes: 0 additions & 9 deletions ingested/repositoryCfg.yaml

This file was deleted.

0 comments on commit 984a15b

Please sign in to comment.