auromat.solving.spacecraft module

This module georeferences images taken from a spacecraft (e.g. a camera onboard the ISS) and looking down at earth using the starfield in the images.

The resulting calibrations can be used with the corresponding auromat.mapping.spacecraft module to compute geodetic coordinates for the image pixels.

auromat.solving.spacecraft.solve(imagePath, wcsPath, tleFolder, spacetrackUser, spacetrackPassword, noradId, debugOutputFolder=None, overwrite=False, maskingFn=<function maskStarfield at 0x865ef50>, solveTimeout=300, noAstrometryPlots=False, channel=None, sigma=None, oddsToSolve=None, verbose=False)[source]

Return True if the image could be georeferenced, otherwise False.

Parameters:
  • wcsPath – path of output file containing calibration WCS headers
  • tleFolder – folder where TLE files are/shall be stored
  • spacetrackPassword (spacetrackUser,) – Credentials to space-track.org used to download TLE data which in turn are used to calculte the spacecraft position at the time the image was taken. These can be None if the tleFolder contains relevant data already.
  • noradId – NORAD ID of the spacecraft
  • debugOutputFolder – folder to store debug images in from masking and astrometry
  • overwrite – True overwrites an existing wcs file, False raises an exception
  • maskingFn – the function to use for masking the starfield in the image
  • solveTimeout

    maximum time in seconds to spend for one astrometry run (note that multiple parameter combinations are tried and each

    counts as a run)
  • noAstrometryPlots – whether to let astrometry.net produce star overlay plots (only relevant when debugOutputFolder is given)
  • channel – R,G,B, or None (average of all channel), the channel to use for masking and astrometry
  • oddsToSolve – default 1e9, see astrometry.net docs
Returns:

True if astrometry was successful (in which case a file at wcsPath was written), otherwise False.

Return type:

bool

auromat.solving.spacecraft.solveImages(imagePaths, wcsFolder, tleFolder, spacetrackUser, spacetrackPassword, noradId, debugOutputFolder=None, parallel=True, maxWorkers=None, solveTimeout=300, maskingFn=<function maskStarfield at 0x865ef50>, returnUnsolved=False, noAstrometryPlots=False, oddsToSolve=None, channel=None, sigma=None, verbose=False)[source]

Returns a generator containing (imagePath, wcsPath) tuples of successfully solved images. This allows to execute actions directly after each solve. Images which are already solved are ignored.

See solve() for parameters.

auromat.solving.spacecraft.solveSequence(imageSequenceFolder, wcsFolder, tleFolder, spacetrackUser, spacetrackPassword, noradId, debugOutputFolder=None, parallel=True, maxWorkers=None, solveTimeout=300, maskingFn=<function maskStarfield at 0x865ef50>, oddsToSolve=None, noAstrometryPlots=False, channel=None, sigma=None, verbose=False)[source]

Returns a generator containing (imagePath, wcsPath) tuples of successfully solved images. This allows to execute actions directly after each solve. Images which are already solved are ignored.

See solve() for parameters.