View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

printing OTIME in fitparams/invertfit output??

aoxsic wrote on Apr 21, 2008

Hello,

I wish to make a plot of the zero point variation during the night, as a sanity check that the calibration went ok. Is there some way to add an exposure time column in the output file of fitparams (actually, the best thing would be to have that column in the output of invertfit) so that I can easily identify which magnitude point comes from which time of the night?

Here's the parameters I use

DIGIPHOT.PHOTCAL.FITPARAMS:

    task=iraf.fitparams
    task.unlearn()
    task.setParam('observations', 'tmpobsfile')
    task.setParam('catalogs','nlandolt')
    task.setParam('config','tmpconfig')
    task.setParam('parameters','tmpcorrectionfit')
    task.setParam('weighting','photometric')
    task.setParam('addscatter','yes')
    task.setParam('maxiter',25)
    task.setParam('nreject','10')
    task.setParam('interactive','no')
    task.setParam('logfile','tmpcorrectionfit.log')
    task.setParam('log_unmatched','yes')
    task.setParam('log_fit','yes')
    task.setParam('log_results','yes')
    task.setParam('mode','h')
    task.run()


content of input files:

tmpobsfile

# FIELD  FILTER   OTIME  AIRMASS  XCENTER   YCENTER     MAG   MERR

OBS0-1   B        21:11:15.0  1.057   889.482    55.546  -5.234 0.191
*             V        21:13:26.0  1.057   888.115    55.448  -6.258 0.099
OBS0-2   B        21:11:15.0  1.057   968.494   191.910  -7.634 0.037
*            V         21:13:26.0  1.057  967.746   191.949  -8.622 0.023

etc.

nlandolt is the landolt catalog in phot$

tmpconfig:
#  Declare the new Landolt UBVRI standards catalog variables

catalog

V	4		# the V magnitude
BV	5		# the (B-V) color
UB	6               # the (U-B) color
VR	7		# the (V-R) color
RI	8		# the (R-I) color
VI	9		# the (V-I) color

error(V)  12		# the V magnitude error
error(BV) 13		# the (B-V) color error
error(UB) 14		# the (U-B) color error
error(VR) 15		# the (V-R) color error
error(RI) 16		# the (R-I) color error
error(VI) 17		# the (V-I) color error
# Declare the observations file variables

observations

TB            3              # time of observation in filter B
XB            4              # airmass in filter B
xB            5              # x coordinate in filter B
yB            6              # y coordinate in filter B
mB            7              # instrumental magnitude in filter B
error(mB)     8              # magnitude error in filter B

TV            10             # time of observation in filter V
XV            11             # airmass in filter V
xV            12             # x coordinate in filter V
yV            13             # y coordinate in filter V
mV            14             # instrumental magnitude in filter V
error(mV)     15             # magnitude error in filter V

# Sample transformation section for the new Landolt UBVRI system

transformation

fit   b1=0.0, b2=0.35, b3=0.000
const b4=0.0
BFIT : mB = (BV + V) + b1 + b2 * XB + b3 * BV + b4 * BV * XB

fit   v1=0.0, v2=0.17, v3=0.000
const v4=0.0
VFIT : mV = V + v1 + v2 * XV + v3 * BV + v4 * BV * XV


The output file from FITPARAMS is tmpcorrectionfit and resutls in :

# Mon 12:45:14 21-Apr-2008
begin	VFIT
	status	0	(Solution converged)
	variance	8.022752E-5
	stdeviation	0.008956982
	avsqerror	8.821159E-5
	averror		0.009392102
	avsqscatter	0.
	avscatter	0.
	chisqr		0.9094895
	msq		6.171348E-5
	rms		0.007855793
	reference	mV
	fitting		V+v1+v2*XV+v3*BV+v4*BV*XV
	weights		photometric
	parameters	4
		v1	(fit)
		v2	(fit)
		v3	(fit)
		v4	(constant)
	derivatives	4
		0.1
		0.1
		0.1
		0.1
	values	4
		-25.90574
		0.1300606
		0.04680019
		0.
	errors	4
		0.02005011
		0.01595143
		0.003774306
		0.

etc.

then if I want to check the results INVERTFIT would give me a file containing:


# Mon 12:45:14 21-Apr-2008
# List of observations files:
#		tmpobsfile
# Number of catalog files:
#		nlandolt
# Config:	tmpconfig
# Parameters:	tmpcorrectionfit
#
# Computed indices for standard objects only
#
# Columns: 
#	1	object id
#	2	V
#	3	error(V)
#	4	resid(V)
#	5	B
#	6	error(B)
#	7	resid(B)


PG1633+099C 13.256  0.003   -0.027  14.345  0.006   INDEF  
PG1633+099B 12.999  0.003   -0.030  14.043  0.005   INDEF  
PG1633+099D 13.688  0.004   0.003   14.224  0.006   INDEF  
PG1633+099 14.369  0.006   0.028   14.221  0.006   INDEF  
PG1633+099A 15.284  0.009   -0.028  16.102  0.014   INDEF  
MARK_A     13.218  0.003   0.040   INDEF   INDEF   INDEF  
MARK_A1    15.895  0.013   0.016   INDEF   INDEF   INDEF  
MARK_A2    14.543  0.007   -0.003  INDEF   INDEF   INDEF  
MARK_A3    14.835  0.008   -0.017  INDEF   INDEF   INDEF  
PG2213-006C 15.115  0.009   -0.006  INDEF   INDEF   INDEF  
PG2213-006B 12.722  0.003   -0.016  INDEF   INDEF   INDEF  
PG2213-006A 14.183  0.006   -0.005  INDEF   INDEF   INDEF  
PG2213-006 14.101  0.005   0.023   INDEF   INDEF   INDEF  



From this is it at all possible to reconstruct which star came from which file? Or directly to see what the time of observation was for that star? How can I add a column?

Thank you in advance for your time.

Mike Fitzpatrick wrote on Apr 21, 2008

From your INVERTFIT output it appears you've set the parameter object=standard to print only the standard star information. By using object=program (or 'all') you would get the same information on the program stars which you could use to match against the table with the exposure time.

There's no direct way to have the task output the OTIME keyword you want, but a small script should be able to merge the tables based on the program star id string (e.g. see the TMERGE task in the TABLES package).

-Mike

Last post on Apr 21, 2008