Compute the indices of the first and last bytes of the HDU: hdu_start=header_start, data_start, data_stop, hdu_stop
Compute the indices of the first and last bytes of the HDU: hdu_start=header_start, data_start, data_stop, hdu_stop
(FitsBlockBoundaries), Instance of FitsBlockBoundaries initialised with the boundaries of the FITS HDU (header+data).
Compute the size of a data block.
Compute the size of a data block.
: (Map[String, String]) Values from the header (see parseHeader)
(Long) Size of the corresponding data block
Check the type of HDU.
Check the type of HDU. Available: BINTABLE, IMAGE, or EMPTY. If not registered, returns NOT UNDERSTOOD. Note: Not working if an image is stored in a primary HDU... TBD.
(String) The kind of HDU data.
Get the comments of the header.
Get the comments of the header. We assume the comments are written after a backslash (\).
: (Array[String]) The header of the HDU.
(Map[String, String]), a map of keyword/comment.
Return the number of HDUs in the FITS file.
Return the number of HDUs in the FITS file.
(Int) the number of HDU.
Convert binary row into row.
Convert binary row into row. You need to have the cursor at the beginning of a row. Example
// Set the cursor at the beginning of the data block setCursor(BlockBoundaries.dataStart) // Initialise your binary row val buffer = Array[Byte](size_of_one_row_in_bytes) // Read the first binary row into buffer data.read(buffer, 0, size_of_one_row_in_bytes) // Convert buffer val myrow = getRow(buffer)
: (Array[Byte]) Row of bytes read from the data block.
(List[_]) The row as list of elements (float, int, string, etc.) with types as given by the header.
Give access to methods concerning BinTable HDU.
Give access to methods concerning BinTable HDU.
(BintableHDU)
Give access to methods concerning Image HDU.
Give access to methods concerning Image HDU.
(ImageHDU)
Read all header blocks of a HDU.
Read all header blocks of a HDU. The cursor needs to be at the start of the header.
(Array[String) the header is an array of Strings, each String being one line of the header.
Read one header block of a HDU.
Read one header block of a HDU. The cursor needs to be at the start of the block. We assume that each header row has a standard size of 80 Bytes, and the total size of the header is 2880 Bytes.
(Array[String) the header block is an array of Strings, each String being one line of the header.
Register the header in the Hadoop configuration.
Register the header in the Hadoop configuration. By doing this, we broadcast the header to the executors. The header is sent as a long String, and can be read properly afterwards using retrieveHeader. Make sure you use the same separators.
Place the cursor at the beginning of the data of the block
Place the cursor at the beginning of the header of the block
Retrieve the header from the Hadoop configuration.
Retrieve the header from the Hadoop configuration. Make sure you use the same separators as in registerHeader.
the header as Array[String]. See readHeader.
Set the cursor at the position
(byte index, Long).
Set the cursor at the position
(byte index, Long).
: (Long) The byte index to seek in the file.
Main class to handle a HDU of a fits file. Main features are