Astrolabe module

“Astrolabe” module that handles comparative calculations.

This modules conducts the comparison calculations between the user input patterns and the star maps.

class Astrolabe.Astrolabe(user_map, starmap, dist_dev, ang_dev, debug_bool)

Bases: object

Parameters
  • user_map (User Map) – User-defined pattern

  • starmap (Star Map) – Current star map to be used for comparison

  • dist_dev (float) – Acceptable deviation from given distances for an accepted hit.

  • ang_dev (float) – Acceptable deviation from given distances for an accepted hit.

  • debug_bool (bool) – Whether a debud file should be created.

__init__(user_map, starmap, dist_dev, ang_dev, debug_bool)

Initialize self. See help(type(self)) for accurate signature.

calculate()

Main calculation function

Compares user patterns and star maps by subtracting all possible star values (angles and distances) from all possible marker values. Matches are recorded and written into a new file.

calculate_marker_bearings()

Calculates distances between markers

The list of markers is passed as a list of coordinates, so angles and distances between them first need to be calculated. Angles are also “normalized”, i.e. one bearing is set to 0 and all angles are expressed relative to that bearing.

calculate_marker_distances()

Calculates distances between markers

The list of markers is passed as a list of coordinates, so angles and distances between them first need to be calculated. Distances are also “normalized”, i.e. one distance is set to 1 and all others expressed as multiples of this unit length.

make_file(new_file, current)

Creates the output file.

Parameters
  • new_file (str) – New filename. Usually the current date

  • current (int) – Identifier to prevent naming conflicts. Is “seeded” with 0 and increases by one until no more naming conflict is detected.

write(string)