Landmark

giant.utilities.stereophotoclinometry:

class giant.utilities.stereophotoclinometry.Landmark(file_name=None, name=None, size=None, scale=None, sigkm=None, rmslmk=None, vlm=None, rot_map2body=None, sigma_lmk=None)[source]

This class is used to read and write from SPC Landmark files.

The Landmark files specify information about a landmark (or center of a Maplet).

When creating an instance of this class you can enter the file_name argument and the data will automatically be read from that file. Alternatively you can specify individual components of the object through key word arguments. If you provide both key word arguments and a file name then the key word arguments you specified will overwrite anything read from the file.

Parameters:
  • file_name (Path | str | None) – The name of the landmark file

  • name (str | None) – the name of the landmark

  • size (int | None) – half the size of the corresponding maplet

  • scale (Real | None) – The ground sample distance of the corresponding maplet in units of km

  • sigkm (Real | None) – The uncertainty of something

  • rmslmk (Real | None) – The rms of something

  • vlm (Sequence | ndarray | None) – the body-fixed landmark vectore

  • rot_map2body (Sequence | ndarray | None) – the rotation matrix from the corresponding maplet frame to the body fixed frame

  • sigma_lmk (Sequence | ndarray | None) – the uncertainty on the body fixed landmark vector

file_name: Path | str | None

The name of the landmark file

rmslmk: float

The residual RMS of the landmark body fixed vector in units of km?

This corresponds to the second component of the SIGKM, RMSLMK line in the LMK file, usually the fourth line.

name: str

The name of the landmark.

This should be a 6 character string, typically alpha-numeric.

This corresponds to the first line of the LMK file.

size: int

Half the number of grid cells on a side for the corresponding Maplet minus 1.

This is computed as to size=(n_rows - 1)/2 where n_rows is the number of rows in the corresponding Maplet (or number of columns since Maplets are always square).

This corresponds to the first component of the SIZE, SCALE line in the LMK file, usually the second line.

scale: float | None

The ground sample distance of each grid cell for the corresponding Maplet in units of KM.

This corresponds to the second component of the SIZE, SCALE line in the LMK file, usually the second line.

sigkm: float

The 1 sigma uncertainty on the landmark body fixed vector in units of km?

this corresponds to the first component of the SIGKM, RMSLMK line in the LMK file, usually the fourth line.

vlm: ndarray

The body-fixed landmark vector in units of km as a length 3 numpy array of floats

This corresponds to all of the components of the VLM line in the LMK file, usually the fifth line.

rot_map2bod: ndarray

The rotation matrix from the corresponding Maplet local frame to the body-fixed frame as a 3x3 numpy array of floats.

This corresponds to all of the components of the UX, UY, and UZ lines in the LMK file, usually lines 6-9. This matrix is formed according to np.vstack([UX, UY, UZ]).

sigma_lmk: ndarray

The 1 sigma uncertainty on all of the components of the landmark body fixed vector in units of km.

This corresponds all of the second component of the SIMGA_LMK line in the LMK file, usually the tenth line.

Summary of Methods

read

This method reads data from a SPC LMK file (normally LMKFILES/*MAPLETNAME*.LMK) and populates the attributes of this class with that data.

write

This function writes the data contained in the current instance of the class into the specified file