rlib/fits_metadata.rb
# Return object path, created from fits metadata and from the original files path.
# @param filetype [String] We want different behaviour for .fits and for .info files
Return object path, created from fits metadata and from the original files path.
Return object path created from fits metadata and from the original files path .
def obj_path(filetype: nil)
    if @list_head_failed == false || @full_metadata['RUN'] != nil
      filetype ||= @filetype
      filename = if filetype == 'info' || @full_metadata['CHIP'].nil? || @full_metadata['CHIP'] == '0'
                   "#{@full_metadata['RUN']}-#{@full_metadata['FIELD']}-#{@full_metadata['COLOUR']}.#{filetype}"
                 else
                   "#{@full_metadata['RUN']}-#{@full_metadata['FIELD']}-#{@full_metadata['COLOUR']}-#{@full_metadata['CHIP']}.#{filetype}"
                 end
      Fits_metadata.create_path(filename: filename, directory: @directory)
    else
      Fits_metadata.create_path(filename: @filename, directory: @directory)
    end
  end
def obj_path ( filetype : nil ) if @list_head_failed == false || @full_metadata [ 'RUN' ] != nil filetype ||= @filetype filename = if filetype == 'info' || @full_metadata [ 'CHIP' ] . nil? || @full_metadata [ 'CHIP' ] == '0' "#{@full_metadata['RUN']}-#{@full_metadata['FIELD']}-#{@full_metadata['COLOUR']}.#{filetype}" else "#{@full_metadata['RUN']}-#{@full_metadata['FIELD']}-#{@full_metadata['COLOUR']}-#{@full_metadata['CHIP']}.#{filetype}" end Fits_metadata . create_path ( filename : filename , directory : @directory ) else Fits_metadata . create_path ( filename : @filename , directory : @directory ) end end
Return object path, created from fits metadata and from the original files path.
Return object path created from fits metadata and from the original files path .
filetype
We want different behaviour for .fits and for .info files
We want different behaviour for . fits and for . info files