Move cal files too

Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
pull/35/head
Pierros Papadeas 2019-08-09 20:04:55 +03:00
parent a313c5c08a
commit 1c467d2f7b
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,6 @@ Consider using a VirtualEnv to run stvid on a separate python virtual environmen
* `sextractor` needs to be executable in your path
* [Astromentry.net](https://github.com/dstndstn/astrometry.net)
* `solve-field` needs to be executable in your path, with index files appropriate for your FOV
* Download the [Tycho 2 catalog](https://www.dropbox.com/s/isbq1wsmfr24zx5/tyc2.fits?dl=0) and specify its path in configuration
## Configuration
* Copy the `configuration.ini-dist` file to `configuration.ini`

View File

@ -5,6 +5,7 @@ import numpy as np
from stvid.stio import fourframe
from stvid.stars import generate_star_catalog
from stvid.stars import store_calibration
from stvid.stars import pixel_catalog
from stvid.astrometry import calibrate_from_reference
from stvid.astrometry import is_calibrated
from stvid.astrometry import generate_reference_with_anet
@ -122,6 +123,8 @@ if __name__ == "__main__":
# Generate star catalog
if not os.path.exists(fname + ".cat"):
pix_catalog = generate_star_catalog(fname)
else:
pix_catalog = pixel_catalog(fname+".cat")
# Calibrate from reference
calibrate_from_reference(fname, "test.fits", pix_catalog)
@ -166,6 +169,7 @@ if __name__ == "__main__":
shutil.move(fname + ".png", os.path.join(processed_dir, fname + ".png"))
shutil.move(fname + ".id", os.path.join(processed_dir, fname + ".id"))
shutil.move(fname + ".cat", os.path.join(processed_dir, fname + ".cat"))
shutil.move(fname + ".cal", os.path.join(processed_dir, fname + ".cal"))
# Sleep
try: