| Class | RFits::Image |
| In: |
lib/rfits/rfits.rb
|
| Parent: | HDU |
| IMG_TYPE_MAP | = | { IO::Proxy::BYTE_IMG => :byte, IO::Proxy::SHORT_IMG => :short, IO::Proxy::LONG_IMG => :long, IO::Proxy::LONGLONG_IMG => :longlong, IO::Proxy::FLOAT_IMG => :float, IO::Proxy::DOUBLE_IMG => :double |
| compression_options | [R] |
Instantiate a new image in the specified file at the specified position, of a certain data type and size. "coptions" is optional, but if present see Compressible#activate_compression for allowed format.
If you do activate compression for an image there is one "gotcha" that might take you by surprise: if there are no existing HDUs in the file and you add a compressed image, an extra image HDU at the start of the file will be created. In other words, your new compressed image will be at fits[1] not fits[0]. This is because cfitsio compresses the image by wrapping it in a binary table, but the FITS specification mandates that the primary HDU must always be an image array.
Number of bits per data pixel. By default returns the "equivalent type" unless equiv is set to false.
Actually create a physical image (i.e. write bytes). "at" is the position at which to insert the image.