Skip to content

Nearby Solving

Jussi Saarivirta edited this page Aug 1, 2021 · 16 revisions

In nearby solves we already have a good idea what the center coordinate of our image is, but still it may be off by several degrees or so. So the nearby solving will scan the nearby areas for possible matches, if a match is not immediately found from the provided center coordinates.

There are two ways to provide the parameters to the solver in nearby mode: manually or from FITS headers.

Manual parameters

When we do not have a FITS file, there are no FITS headers to dig the coordinates from and the solver needs manual input. Minimum parameters example:

watney-solve nearby --image andromeda.png --manual --ra "00 41 02" --dec "41 07 50" --field-radius 2 --search-radius 10

You may also just run watney-solve nearby to get the list of available parameters.

For reference, the parameters available in manual solve are:

Parameter Description
-m, --manual Specifies that the center is provided using --ra and --dec parameters and scope radius in --field-radius.
-r, --ra The search center in RA coordinate (either decimal or hours minutes seconds).
-d, --dec The search center in Dec coordinate (either decimal or degrees minutes seconds).
-f, --field-radius The (telescope) field radius (in degrees) to use.
-s, --search-radius Required. The search radius (deg), the solver search will cover this area around the center coordinate.
-p, --use-parallelism (Default: false) Use parallelism, search multiple areas simultaneously.
-i, --image Required. The image file to solve.
--out-format (Default: json) Output format. Valid values are 'json', 'tsv'.
-o, --out Output file. If not set, output will be printed to stdout.
-x, --lower-density-offset (Default: 1) Include this many lower quad density passes in search (compared to image quad density).
-z, --higher-density-offset (Default: 1) Include this many higher quad density passes in search (compared to image quad density).
--extended (Default: false) Produce extended output. This will print out a lot of additional detail about the solve.
--log-stdout (Default: false) Verbose logging. If true, will log a lot of additional lines to stdout.
--log-file (Default: ) Verbose logging. Give a filename to print verbose log lines into a file.

The output

The standard output (non-extended) as JSON looks like:

{
  "success": true,
  "ra": 10.699383363408096,
  "dec": 41.233739193910566,
  "fieldRadius": 1.9419199703800536,
  "orientation": 118.30302117174008,
  "pixScale": 2.398400722425611
}

Where:

  • success: true or false
  • ra: the RA coordinate as decimal degrees
  • dec: the Dec coordinate as decimal degrees
  • fieldRadius: the field radius in degrees (imagine a circle drawn around the image's widest corners)
  • orientation: the field orientation in degrees
  • pixScale: pixel scale, in arc seconds per pixel

The TSV output is plain key-value strings, with key and value separated by a tab character ('\t'):

success true
ra      10.699383363408096
dec     41.233739193910566
fieldRadius     1.9419199703800536
orientation     118.30302117174008
pixScale        2.398400722425611

The extended output (--extended flag) gives out some more information:

{
  "success": true,
  "ra": 10.699383363408094,
  "dec": 41.233739193910566,
  "fieldRadius": 1.9419199703800565,
  "orientation": 118.30302117174008,
  "pixScale": 2.3984007224256145,
  "timeSpent": "00:00:00.5028904",
  "searchIterations": 1,
  "searchRunCenter": "[10.25, 41.128055555555555]",
  "searchRunRadius": 2.0,
  "quadMatches": 108,
  "fieldWidth": 3.097934266466419,
  "fieldHeight": 2.3424380389023503,
  "fits_cd1_1": -0.0003157366622118217,
  "fits_cd1_2": 0.0005867266726920985,
  "fits_cd2_1": -0.0005864879715460347,
  "fits_cd2_2": -0.00031595967211472953,
  "fits_cdelt1": 0.0006660764075035569,
  "fits_cdelt2": 0.0006663923040155763,
  "fits_crota1": 118.30302117174008,
  "fits_crota2": 118.29586663465102,
  "fits_crpix1": 2325.0554679307497,
  "fits_crpix2": 1758.1229364862065,
  "fits_crval1": 10.699455989783395,
  "fits_crval2": 41.23366782000766
}
  • timeSpent: time spent on the solve
  • searchIterations: how many areas were searched
  • searchRunCenter: the center coordinate of the search run that produced the result
  • searchRunRadius: the field radius that was used in the above search run
  • quadMatches: how many star quads matched
  • fieldWidth: the width of the field, in degrees
  • fieldHeight: the height of the field, in degrees
  • fits_cd1_1 .. fits_cd2_2: for FITS, rotation and scale matrix
  • fits_cdelt1..2: for FITS, coordinate increment along axis n
  • fits_crota1..2: for FITS, coordinate system rotation angle
  • fits_crpix1..2: for FITS, pixel coordinates of the reference point to which the projection and the rotation refer
  • fits_crval1..2: for FITS, the center coordinate as right ascension and declination or longitude and latitude in decimal degrees

How it works

The technicality is described in more detail in NearbySearchStrategy.