Link Search Menu Expand Document

TFormatLine

Unit DeLaFitsCommon

Type type

PFormatLine = ^TFormatLine;
TFormatLine = record
  vaStr: record
    wWidth: ShortInt;
    wWidthQuoteInside: ShortInt;
  end;
  vaBol: record
    wWidth: ShortInt;
  end;
  vaInt: record
    wWidth: ShortInt;
    wSign: Boolean;
    wFmt: string;
  end;
  vaFloat: record
    wWidth: ShortInt;
    wSign: Boolean;
    wFmt: string;
  end;
  vaDateTime: record
    rFmtShortDate: TFmtShortDate;
    wWidth: ShortInt;
    wWidthQuoteInside: ShortInt;
  end;
  vaCoord: record
    rFmtMeaRa: TFmtMeaCoord;
    wWidth: ShortInt;
    wWidthQuoteInside: ShortInt;
    wPrecRa: Word;
    wPrecDe: Word;
    wFmtMeaRa: TFmtMeaCoord;
    wFmtRepCoord: TFmtRepCoord;
  end;
end;

Description

Each 80-character header keyword record shall consist of a keyword name, a value indicator (only required if a value is present), an optional value, and an optional comment The FITS Standard, Sect. 4.1.1

Parameters for parsing and composing a header lines. Format of Date, Time, Coordinates, and text representation.

String value

  • vaStr.wWidth - compose parameter, the minimum number of text characters, by default -20

    vaStr.wWidth := -5 -> compose('text') = 'text '
    vaStr.wWidth :=  5 -> compose('text') = ' text'
    
  • vaStr.wWidthQuoteInside - compose parameter, the minimum number of quoted text characters, by default -8

    vaStr.wWidthQuoteInside := -5 -> compose('text') := '"text "'
    vaStr.wWidthQuoteInside :=  5 -> compose('text') := '" text"'
    

Boolean value

  • vaBol.wWidth - compose parameter, the minimum number of text characters, by default 20

    vaBol.wWidth := -5 -> compose(True) = 'T    '
    vaBol.wWidth :=  5 -> compose(True) = '    T'
    

Integer value

  • vaInt.wWidth - compose parameter, the minimum number of text characters, by default 20
  • vaInt.wSign - compose parameter, include a number sign in the text, by default False

    vaInt.wSign := True  -> compose(5) = '+5'
    vaInt.wSign := False -> compose(5) = '5'
    
  • vaInt.wFmt - compose parameter, arguments a Format function, by default ā€œ%dā€

Float value

  • vaFloat.wWidth - compose parameter, the minimum number of text characters, by default 20
  • vaFloat.wSign - compose parameter, include a number sign in the text, by default False
  • vaFloat.wFmt - compose parameter, arguments a Format function, by default ā€œ%gā€

DataTime value

  • vaDateTime.rFmtShortDate - parse parameter, short date format: YY-MM-DD or DD-MM-YY, by default yymmdd

    vaDateTime.rFmtShortDate := yymmdd -> parse('10.11.12') = 1910 year 11 month 12 day
    vaDateTime.rFmtShortDate := ddmmyy -> parse('10.11.12') = 1912 year 11 month 10 day
    
  • vaDateTime.wWidth - compose parameter, the minimum number of text characters, by default -20
  • vaDateTime.wWidthQuoteInside - compose parameter, the minimum number of quoted text characters, by default -8

Coordinates value

  • vaCoord.rFmtMeaRa - parse parameter, the format of Right Ascension: degrees or hours, by default coHour

    vaCoord.rFmtMeaRa := coDegree -> parse('12.3456') = 12 degrees 20 minutes 44.2 seconds
    vaCoord.rFmtMeaRa := coHour   -> parse('12.3456') = 12 hours 20 minutes  44.16 seconds
    
  • vaCoord.wWidth - compose parameter, the minimum number of text characters, by default -20
  • vaCoord.wWidthQuoteInside - compose parameter, the minimum number of quoted text characters, by default -8
  • vaCoord.wPrecRa - compose parameter, the precision of the textual representation of Right Ascension, the number of digits after the decimal point in degree, by default 4 ~ 1 seconds in degree
  • vaCoord.wPrecDe - compose parameter, the precision of the textual representation of Declination, the number of digits after the decimal point in degree, by default 4 ~ 1 seconds in degree
  • vaCoord.wFmtMeaRa - compose parameter, the format of Right Ascension: degrees or hours, by default coHour

    vaCoord.wFmtMeaRa := coDegree -> compose(12.3456) = '12:20:44.2' in degrees
    vaCoord.wFmtMeaRa := coHour   -> compose(12.3456) = '12:20:44.16' in hours
    
  • vaCoord.wFmtRepCoord - compose parameter, the text representation of Right Ascension and Declination: decimal or hexadecimal, by defaul coParts

    // Right Ascension
    vaCoord.wFmtRepCoord := coWhole -> compose(12.3456 degrees) = '12.3456' in degree
    vaCoord.wFmtRepCoord := coParts -> compose(12.3456 degrees) = '12:20:44.16' in degree
    
    // Declination
    vaCoord.wFmtRepCoord := coWhole -> compose(12.3456 degrees) = '12.3456' in degree
    vaCoord.wFmtRepCoord := coParts -> compose(12.3456 degrees) = '+12:20:44.16' in degree
    

See Also

TFmtMeaCoord
TFmtRepCoord