Loading noche/daemon.py +1 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ class FitsFileHandler(FileSystemEventHandler): try: if self.auto_filename: # Have to double from noche.py as there is also the directory log.info(f"AUTO filename in the form: RAW.telescop_key.time_stamp.fits") prefix = "RAW" tel = self.noche.header["TELESCOP"].replace(" ","_").upper() Loading noche/noche.py +9 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,7 @@ class Noche: self.hdu = hdul[0].copy() # to avoid I/O issues with writing def write_noctis_fits(self, filename=None, overwrite=True): log.debug(sys._getframe().f_code.co_name) data = self.hdu.data # Original data original_hdu = fits.ImageHDU(header=self.hdu.header, name="ORIGINAL") Loading @@ -609,6 +610,14 @@ class Noche: print(noche_hdu.header) hdul = fits.HDUList([noche_hdu, original_hdu]) if not filename: prefix = "RAW" tel = self.noche.header["TELESCOP"].replace(" ","_").upper() timestamp = self.noche.header["DATE-OBS"].replace(":","_") filename = self.output_dir / f"{prefix}.{tel}.{timestamp}.fits" log.warning(f"No filename provided, using {filename}") hdul.writeto(filename, overwrite=overwrite, checksum=True) Loading Loading
noche/daemon.py +1 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ class FitsFileHandler(FileSystemEventHandler): try: if self.auto_filename: # Have to double from noche.py as there is also the directory log.info(f"AUTO filename in the form: RAW.telescop_key.time_stamp.fits") prefix = "RAW" tel = self.noche.header["TELESCOP"].replace(" ","_").upper() Loading
noche/noche.py +9 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,7 @@ class Noche: self.hdu = hdul[0].copy() # to avoid I/O issues with writing def write_noctis_fits(self, filename=None, overwrite=True): log.debug(sys._getframe().f_code.co_name) data = self.hdu.data # Original data original_hdu = fits.ImageHDU(header=self.hdu.header, name="ORIGINAL") Loading @@ -609,6 +610,14 @@ class Noche: print(noche_hdu.header) hdul = fits.HDUList([noche_hdu, original_hdu]) if not filename: prefix = "RAW" tel = self.noche.header["TELESCOP"].replace(" ","_").upper() timestamp = self.noche.header["DATE-OBS"].replace(":","_") filename = self.output_dir / f"{prefix}.{tel}.{timestamp}.fits" log.warning(f"No filename provided, using {filename}") hdul.writeto(filename, overwrite=overwrite, checksum=True) Loading