diff --git a/nuwavsource/badpix_headers/nuAuserbadpixDET0.txt b/nuwavsource/badpix_headers/nuAuserbadpixDET0.txt new file mode 100644 index 0000000..3eca974 --- /dev/null +++ b/nuwavsource/badpix_headers/nuAuserbadpixDET0.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 1 / There shall be one instance of this extension f +DETNAM = 'DET0 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMA ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuAuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #0 of the FPMA, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuAuserbadpixDET1.txt b/nuwavsource/badpix_headers/nuAuserbadpixDET1.txt new file mode 100644 index 0000000..27ed739 --- /dev/null +++ b/nuwavsource/badpix_headers/nuAuserbadpixDET1.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 2 / There shall be one instance of this extension f +DETNAM = 'DET1 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMA ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuAuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #1 of the FPMA, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuAuserbadpixDET2.txt b/nuwavsource/badpix_headers/nuAuserbadpixDET2.txt new file mode 100644 index 0000000..9321b7b --- /dev/null +++ b/nuwavsource/badpix_headers/nuAuserbadpixDET2.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 3 / There shall be one instance of this extension f +DETNAM = 'DET2 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMA ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuAuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #2 of the FPMA, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuAuserbadpixDET3.txt b/nuwavsource/badpix_headers/nuAuserbadpixDET3.txt new file mode 100644 index 0000000..529adaa --- /dev/null +++ b/nuwavsource/badpix_headers/nuAuserbadpixDET3.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 4 / There shall be one instance of this extension f +DETNAM = 'DET3 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMA ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuAuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #3 of the FPMA, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuAuserbadpix_main.txt b/nuwavsource/badpix_headers/nuAuserbadpix_main.txt new file mode 100644 index 0000000..dfa020b --- /dev/null +++ b/nuwavsource/badpix_headers/nuAuserbadpix_main.txt @@ -0,0 +1,11 @@ +SIMPLE = T / file does conform to FITS standard +BITPIX = 16 / number of bits per data pixel +NAXIS = 0 / number of data axes +EXTEND = T / FITS dataset may contain extensions +COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy +COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMA ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +END diff --git a/nuwavsource/badpix_headers/nuBuserbadpixDET0.txt b/nuwavsource/badpix_headers/nuBuserbadpixDET0.txt new file mode 100644 index 0000000..00994ed --- /dev/null +++ b/nuwavsource/badpix_headers/nuBuserbadpixDET0.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 1 / There shall be one instance of this extension f +DETNAM = 'DET0 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMB ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuBuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #0 of the FPMB, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuBuserbadpixDET1.txt b/nuwavsource/badpix_headers/nuBuserbadpixDET1.txt new file mode 100644 index 0000000..73964a3 --- /dev/null +++ b/nuwavsource/badpix_headers/nuBuserbadpixDET1.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 2 / There shall be one instance of this extension f +DETNAM = 'DET1 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMB ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuBuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #1 of the FPMA, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuBuserbadpixDET2.txt b/nuwavsource/badpix_headers/nuBuserbadpixDET2.txt new file mode 100644 index 0000000..9267f31 --- /dev/null +++ b/nuwavsource/badpix_headers/nuBuserbadpixDET2.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 3 / There shall be one instance of this extension f +DETNAM = 'DET2 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMB ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuBuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #2 of the FPMA, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuBuserbadpixDET3.txt b/nuwavsource/badpix_headers/nuBuserbadpixDET3.txt new file mode 100644 index 0000000..b8f4ed3 --- /dev/null +++ b/nuwavsource/badpix_headers/nuBuserbadpixDET3.txt @@ -0,0 +1,46 @@ +XTENSION= 'BINTABLE' / binary table extension +BITPIX = 8 / 8-bit bytes +NAXIS = 2 / 2-dimensional binary table +NAXIS1 = 12 / width of table in bytes +NAXIS2 = 64 / number of rows in table +PCOUNT = 0 / size of special data area +GCOUNT = 1 / one data group (required keyword) +TFIELDS = 4 / number of fields in each row +TTYPE1 = 'TIME ' / Start Time of Bad Pixel Interval +TFORM1 = '1D ' / data format of field: 8-byte DOUBLE +TUNIT1 = 's ' / physical unit of field +TTYPE2 = 'RAWX ' / X-position in Raw Detector Coordinates +TFORM2 = '1B ' / data format of field: BYTE +TUNIT2 = 'pixel ' / physical unit of field +TTYPE3 = 'RAWY ' / Y-position in Raw Detector Coordinates +TFORM3 = '1B ' / data format of field: BYTE +TUNIT3 = 'pixel ' / physical unit of field +TTYPE4 = 'BADFLAG ' / Bad pixel flag +TFORM4 = '16X ' / data format of field: BIT +EXTNAME = 'BADPIX ' / Name of the binary table extension +EXTVER = 4 / There shall be one instance of this extension f +DETNAM = 'DET3 ' / CZT Detector ID (0,1,2 or 3) +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMB ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +VERSION = 1 / Extension version number +FILENAME= 'nuBuserbadpix20100101v001.fits' / File name +CONTENT = 'NuSTAR User Bad Pixel Table' / File content +CCLS0001= 'BCF ' / Daset is a Basic Calibration File +CDTP0001= 'DATA ' / Calibration file contains data +CCNM0001= 'BADPIX ' / Type of calibration data +CVSD0001= '2010-01-01' / Date when this file should first be used +CVST0001= '00:00:00' / Time of day when this file should first be used +CDES0001= 'NuSTAR User Bad Pixel Table' / Description +COMMENT +COMMENT This extension provides, for Detector #3 of the FPMA, the list of +COMMENT user-defined bad pixels. +COMMENT The BADFLAG column contains the bad pixel flags. These are a +COMMENT combination of the following bit settings: +COMMENT +COMMENT b0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File +COMMENT b0000000000000010 Disabled pixel from on-board software +COMMENT b0000000000000100 Bad pixels in the file provided by the user +COMMENT +END diff --git a/nuwavsource/badpix_headers/nuBuserbadpix_main.txt b/nuwavsource/badpix_headers/nuBuserbadpix_main.txt new file mode 100644 index 0000000..dfa020b --- /dev/null +++ b/nuwavsource/badpix_headers/nuBuserbadpix_main.txt @@ -0,0 +1,11 @@ +SIMPLE = T / file does conform to FITS standard +BITPIX = 16 / number of bits per data pixel +NAXIS = 0 / number of data axes +EXTEND = T / FITS dataset may contain extensions +COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy +COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H +TELESCOP= 'NuSTAR ' / Telescope (mission) name +INSTRUME= 'FPMA ' / Instrument name (FPMA or FPMB) +ORIGIN = 'Caltech ' / Source of FITS file +CREATOR = 'FTOOLS 6.10 ' / Creator +END diff --git a/nuwavsource/nuwavsource.py b/nuwavsource/nuwavsource.py index 5412c24..8d73fb8 100644 --- a/nuwavsource/nuwavsource.py +++ b/nuwavsource/nuwavsource.py @@ -2,7 +2,7 @@ import numpy as np import itertools from pandas import DataFrame, read_csv -from astropy.table import Table, unique +from astropy.table import Table from astropy.coordinates import SkyCoord from astropy import units as u from multiprocessing import get_context, cpu_count @@ -307,25 +307,43 @@ class Observation: Returns a hdu_list with positions of masked pixels in RAW coordinates. """ x_region, y_region = np.where(region) - tables = [] + hdus = [] for i in range(4): current_dir = dirname(__file__) pixpos = Table(fits.getdata(f'{current_dir}\\pixpos\\nu{self.det}pixpos20100101v007.fits', i+1)) pixpos = pixpos[pixpos['REF_DET1X'] != -1] + test = np.zeros(len(pixpos['REF_DET1X']), dtype=bool) for idx, (x, y) in enumerate(zip(pixpos['REF_DET1X'], pixpos['REF_DET1Y'])): test[idx] = np.logical_and(np.equal(x, x_region), np.equal(y, y_region)).any() - table = Table({'RAWX': pixpos['RAWX'][test], 'RAWY': pixpos['RAWY'][test]}) - if not table: - tables.append(table) - else: - tables.append(unique(table)) + + positions = np.array((pixpos['RAWX'][test], pixpos['RAWY'][test])) + if sum(test) != 0: + positions = np.unique(positions, axis=1) + rawx, rawy = positions[0], positions[1] + + time_start = float(78913712) + bad_flag = np.zeros(16, dtype=bool) + bad_flag[13] = 1 + + columns = [] + columns.append(fits.Column('TIME', '1D', 's', array=len(rawx) * [time_start])) + columns.append(fits.Column('RAWX', '1B', 'pixel', array=rawx)) + columns.append(fits.Column('RAWY', '1B', 'pixel', array=rawy)) + columns.append(fits.Column('BADFLAG', '16X', array=len(rawx) * [bad_flag])) + + hdu = fits.BinTableHDU.from_columns(columns) + naxis1, naxis2 = hdu.header['NAXIS1'], hdu.header['NAXIS2'] + hdu.header = fits.Header.fromtextfile(f'{current_dir}\\badpix_headers\\nu{self.det}userbadpixDET{i}.txt') + hdu.header['NAXIS1'] = naxis1 + hdu.header['NAXIS2'] = naxis2 + hdus.append(hdu) + + primary_hdu = fits.PrimaryHDU() + primary_hdu.header = fits.Header.fromtextfile(f'{current_dir}\\badpix_headers\\nu{self.det}userbadpix_main.txt') hdu_list = fits.HDUList([ - fits.PrimaryHDU(), - fits.table_to_hdu(tables[0]), - fits.table_to_hdu(tables[1]), - fits.table_to_hdu(tables[2]), - fits.table_to_hdu(tables[3]), + primary_hdu, + *hdus ]) return hdu_list