-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpairitel_pyraf_2.py
More file actions
executable file
·42 lines (29 loc) · 1.02 KB
/
pairitel_pyraf_2.py
File metadata and controls
executable file
·42 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- coding: utf-8 -*-
#write this as script for now, turn parts in sensible functions later
#keep all intermediate steps so I can track down errors
#change this behavious later e.g. use os.tmpfile or maybe tempfile.XXX()
# /usr/local/bin/ipython --colors lightbg # use this python because it knows where pyraf is.
import astropy.io.fits as pyfits
import shutil
from pyraf import iraf
import glob
import os
import sys
import astropy.io.ascii as ascii
import numpy as np
import string
import pickle
from copy import deepcopy
import input_info
reload(input_info)
import photometry
reload(photometry)
import photometry_both
reload(photometry_both)
iraf.noao()
iraf.digiphot()
iraf.daophot()
# do psf photometry for master image.
masterpsffile = input_info.masterimage + '.pstbyhand'
threshold_secondrun = 10.
photometry.do_psf_photometry([input_info.masterimage], satmag=input_info.satmag, photfilesuffix=input_info.photfilesuffix,psfstarfile=masterpsffile, thresh = threshold_secondrun, psfcleaningradius=input_info.pfscleaningradius)