Merge pull request #67 from EelkeVisser/fixprocess

Make process.py robust for when not yet calibrated
master
Cees Bassa 2022-07-11 12:00:25 +02:00 committed by GitHub
commit 733ef85b9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 37 additions and 30 deletions

View File

@ -200,6 +200,8 @@ if __name__ == "__main__":
solved = False
# Loop over files to find a suitable calibration file
for fname in fnames:
# Was this file already tried?
if not os.path.exists(fname+".cat"):
# Generate star catalog
pix_catalog = generate_star_catalog(fname)
@ -211,7 +213,12 @@ if __name__ == "__main__":
# Break when solved
if solved:
break
else:
# test.fits exists, so calibration has been solved
solved = True
# Only attempt processing if we have a calibration file
if solved:
p = mp.Pool(processes=cpu_count)
try: