dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
661 stars 185 forks source link

Call solve-field within a python script #247

Closed hamed-AM closed 2 years ago

hamed-AM commented 2 years ago

Hi Dustin,

Could you please advise on this:

I would like to call solve-field (e.g. solve-field my_image.fits --overwrite --downsample 2) within a line of my python code. Using "subprocess" method I can call "solve-field" alone, and can not specify an image, some parameters and so on.

Thanks Hamed

dstndstn commented 2 years ago

What does your code look like? You should be able to do

import subprocess
subprocess.call(['solve-field', 'image.fits'])

ie, pass a list of strings containing the command-line arguments.