bintable procedure - ITA-Solar/solo-spice-ql GitHub Wiki

spice_data::get_bintable_info

This is an internally used procedure that collects all info about present bintables in the FITS files during the initialisation of the object. So far, it looked only at VAR_KEYS in the first extension, assuming it is the same for all extensions. This will have to be changed. Also, it didn't parse the tags of the keywords but included those in the types.

New:

  • find VAR_KEYS in ALL extensions
  • parse tag separately

Collect values from all VAR_KEYS in all data extensions. Parse the value, such

<bintable-extension-name1>;<keyword1>[<tag1>],<keyword2>[<tag2>],<bintable-extension-name2>;<keyword3>[<tag3>]

and put information in a structure, like this:

temp_column = {
  wcsn:'', 
  tform:'',  
  ttype:'',   ; does no longer include the tag
  tag:'',     ; NEW
  tdim:'', 
  tunit:'', 
  tunit_desc:'', 
  tdmin:'', 
  tdmax:'', 
  tdesc:'', 
  bin_extension_name:'',    : NEW name
  data_extension_name:'',   ; NEW
  data_extension_index:0,   ; NEW
  values:ptr_new()
  }

where only ttype, tag, bin_extension_name, data_extension_name and data_extension_index do get populated. The other values will be populated once the user asks for them, and the appropriate table is loaded.

Note that I separate now tag from type.

spice_data::get_header_keyword

Current documentation

header_keyword_value = spice_object->get_header_keyword(keyword, extension_index, missing_value, exists=exists, $
  variable_values=variable_values, values_only=values_only)

This doesn't need to be changed. With the new version, it will work also with keyword=ttype without the tag. The extension_index is mandatory and it is therefore obvious which bintable is wanted, even if the same keyword exists multiple times, but each with its own tag.

spice_data::get_bintable_ttypes

Current documentation

Old:

Returns all ttypes found with spice_data::get_bintable_info, i.e.

  return, (*self.bintable_columns).ttype

New:

Some keywords may now appear several times, e.g. RADCAL, once per extension.

  • Add keyword extension_index as input to this function to limit the output ??? E.g.:
ttypes = spice_object->get_bintable_ttypes(extension_index=extension_index)
  • Add switch to output also tag ??? If yes, how? Added to ttype? As a separate output variable? E.g.
ttypes = spice_object->get_bintable_ttypes(/include_tag)
  -> ttypes = ['RADCAL[Window_xxx_...]', 'RADCAL[Window_yyy_...]', 'RADCAL[Window_zzz_...]']
ttypes = spice_object->get_bintable_ttypes(tags=tags)
  -> ttypes = ['RADCAL', 'RADCAL', 'RADCAL']
  -> tags = ['Window_xxx_...', 'Window_yyy_...', 'Window_zzz_...']

spice_data::get_bintable_data

Current documentation

data = spice_object->get_bintable_data( [ttypes] [, /values_only] [, extension_index=extension_index] [, tag=tag] )

New:

  • keyword extension_index to limit/specify output.
  • keyword tag to specify output.
  • ttypes may include a tag to specify output. Tag must be in square brackets. This is an alternative to providing the tag keyword.
⚠️ **GitHub.com Fallback** ⚠️