Class: RFits::BinaryTable

Inherits:
Table show all
Defined in:
lib/rfits/rfits.rb

Overview

A class representing a binary table.

Constant Summary

Constants inherited from HDU

HDU::HDU_TYPE_MAP

Instance Attribute Summary

Attributes inherited from Table

#column_information, #data

Attributes inherited from HDU

#data, #file, #header

Instance Method Summary collapse

Methods inherited from Table

#initialize, #to_csv, #to_s

Methods inherited from HDU

#hdu_type, #initialize, #position, #reset_position

Constructor Details

This class inherits a constructor from RFits::Table

Instance Method Details

#create(at) ⇒ Object



1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
# File 'lib/rfits/rfits.rb', line 1312

def create(at)
  self.file.set_position(at - 1 < 0 ? 0 : at - 1)

  IO::Proxy.fits_insert_btbl(self.file.io, 0, @column_names.size,
    @column_names,
    @column_formats,
    @column_units,
    @extname, 0)
    
  @extpos = at
  
  # This just makes sure something is written out right away.
  self.header['RFITS1234'] = 'temp'
  self.header.delete('RFITS1234')
end