github ↗
docs menu

Module Fits.Value

Value fields.

#type 'a t

The type for how a value field reads and prints as an 'a.

#val bool : bool t

bool is the logical T or F.

#val int : int t

int is integer text within int's range. An integer past it reads with text.

#val float : float t

float is integer or real text (FITS 4.0 §4.2.4), read correctly rounded. NAN, INF, hexadecimal floats, underscores and a real past float64's range do not read. It prints the fewest significant digits that read back to the float, the nearest of them, with a point or an exponent.

#val string : string t

string is a quoted string, with doubled quotes read as one, the CONTINUE records after a string ending in & joined (§4.2.1.2), and trailing spaces dropped: '' is "" and ' ' is " ".

#val text : string t

text is the value field as written, trimmed: a string's text keeps its quotes. It prints as given, which must be one FITS value.

#val map : ('a -> ('b, string) Stdlib.result) -> ('b -> 'a) -> 'a t -> 'b t

map f g v reads with v then f, and prints with g then v.