View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Photcal transformations

Fenris wrote on Jul 12, 2007

I have been exploring the photcal package and attempting to make a good fit for a set of five standard stars. I've applied mkimsets, mkapfile, mkconfig, mknobsfile, mkcatalog, fitparams and invertfit in roughly that order. However, the output of invertfit does not seem right:

cl> type ztd.calib

# Mon 22:53:33 09-Jul-2007
# List of observations files:
#               std.obs
# Config:       ztd.config
# Parameters:   ztd.params
#
# Computed indices for program and standard objects
#
# Columns: 
#       1       object id
#       2       V
#       3       error(V)
#       4       VR
#       5       error(VR)
#       6       VI
#       7       error(VI)


BD+28-4211 8.654   0.211   0.189   0.040   0.375   0.080  
HD186408   6.163   0.103   0.393   0.019   0.762   0.039  
HD195919   13.785  0.142   -0.860  0.027   -1.754  0.054  
HD217014   -5.186  0.105   2.347   0.020   4.731   0.040  
HD5612     13.851  0.180   -0.992  0.034   -2.083  0.069  


The corresponding catalog file is as follows:

cl> type std.catalog
# CATALOG: std.catalog
# NCOLS: 5
# HDRLENGTH: 63
# 
# ID               V           BV          VR          RI        
# 15               10          10          10          10        

  HD5612           6.32        0.90        0.462       0.421     
  HD217014         5.455       0.67        0.373       0.326     
  HD195919         8.981       0.05        0.031       0.038     
  HD186408         5.980       0.648       0.357       0.341     
  BD+28-4211       10.53       -0.34       -0.147      -0.17     


Particularly the second-last star appears to have been fitted well off. As far as I understand invertfit should yield back magnitudes close or equal to those of the catalog. I am not sure why it does not, but my first guess would be that the transformation equations I have used are not in order. The config file:

cl> type ztd.config

catalog

V  2
BV  3
VR  4
RI  5
# Declare the observations file variables

observations

TV            3              # time of observation in filter V
XV            4              # airmass in filter V
xV            5              # x coordinate in filter V
yV            6              # y coordinate in filter V
mV            7              # instrumental magnitude in filter V
error(mV)     8              # magnitude error in filter V

TR            10             # time of observation in filter R
XR            11             # airmass in filter R
xR            12             # x coordinate in filter R
yR            13             # y coordinate in filter R
mR            14             # instrumental magnitude in filter R
error(mR)     15             # magnitude error in filter R

TI            17             # time of observation in filter I
XI            18             # airmass in filter I
xI            19             # x coordinate in filter I
yI            20             # y coordinate in filter I
mI            21             # instrumental magnitude in filter I
error(mI)     22             # magnitude error in filter I

# Sample transformation section for the new Landolt UBVRI system

transformation

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

fit   r1=0.0, r2=0.08, r3=0.000
const r4=0.0
RFIT : mR = (V - VR)  + r1 + r2 * XR + r3 * VR + r4 * VR * XR

set VI = VR + RI
fit   i1=0.0, i2=0.03, i3=0.000
const i4=0.0
IFIT : mI = (V - VI) + i1 + i2 * XI + i3 * VI + i4 * VI * XI


My images were taken in the V, R and I filters and I arrived at these equations by modifying the new Landolt UBVRI equations slightly, having also read some advice on these forums. If that isn't what's wrong, I'm really open to any advice. The parameter file, in case it may be helpful:

cl> type ztd.params
# Mon 22:52:46 09-Jul-2007
begin   VFIT
        status  0       (Solution converged)
        variance        0.1189731
        stdeviation     0.3449247
        avsqerror       1.
        averror         1.
        avsqscatter     0.
        avscatter       0.
        chisqr          0.1189731
        msq             0.04758924
        rms             0.2181496
        reference       mV
        fitting         V+v1+v2*XV+v3*VR+v4*VR*XV
        weights         uniform
        parameters      4
                v1      (fit)
                v2      (fit)
                v3      (fit)
                v4      (constant)
        derivatives     4
                0.1
                0.1
                0.1
                0.1
        values  4
                -1.269951
                1.433493
                5.268209
                0.
        errors  4
                1.74234
                0.7701116
                1.011417
                0.

# Mon 22:52:50 09-Jul-2007
begin   RFIT
        status  0       (Solution converged)
        variance        0.107224
        stdeviation     0.3274508
        avsqerror       1.
        averror         1.
        avsqscatter     0.
        avscatter       0.
        chisqr          0.107224
        msq             0.0428896
        rms             0.2070981
        reference       mR
        fitting         (V-VR)+r1+r2*XR+r3*VR+r4*VR*XR
        weights         uniform
        parameters      4
                r1      (fit)
                r2      (fit)
                r3      (fit)
                r4      (constant)
        derivatives     4
                0.1
                0.1
                0.1
                0.1
        values  4
                -2.333274
                1.578989
                6.340056
                0.
        errors  4
                1.651672
                0.7272941
                0.9640136
                0.

# Mon 22:52:54 09-Jul-2007
begin   IFIT
        status  0       (Solution converged)
        variance        0.09798328
        stdeviation     0.3130228
        avsqerror       1.
        averror         1.
        avsqscatter     0.
        avscatter       0.
        chisqr          0.09798328
        msq             0.03919331
        rms             0.197973
        reference       mI
        fitting         (V-VI)+i1+i2*XI+i3*VI+i4*VI*XI
        weights         uniform
        parameters      4
                i1      (fit)
                i2      (fit)
                i3      (fit)
                i4      (constant)
        derivatives     4
                0.1
                0.1
                0.1
                0.1
        values  4
                -0.3178893
                1.084767
                3.626348
                0.
        errors  4
                1.428565
                0.6251633
                0.4498163
                0.


Thanks in advance for any help.

Francisco Valdes wrote on Jul 12, 2007

Hi,

I realize this is something you asked about quite some time ago but if you still want someone to take a look at it please respond. You sent good detailed info but did not send the actual observation file (std.obs). If you could do that I would be glad to give you comments.

Yours,
Frank Valdes

Fenris wrote on Jul 12, 2007

Hello,

indeed it has been some time but the issue remains. I was actually just about to post again and add some things, so nice coincidence. About the obs file, had a feeling I had forgotten something...

cl> type std.obs

# FIELD         FILTER           OTIME AIRMASS  XCENTER   YCENTER     MAG   MERR

BD+28-4211       V           22:56:29.0  2.162   645.460   398.210  11.477  0.002
*                R           22:57:29.0  2.171   647.240   397.270  10.756  0.002
*                I           22:57:58.0  2.175   648.460   397.100  11.681  0.002
HD186408        V           22:35:44.0  1.769   642.470   779.970   9.497  0.001
*               R           22:36:23.0  1.772   643.910   778.730   8.724  0.001
*               I           22:36:52.0  1.774   644.400   779.050   9.770  0.002
HD195919        V           22:25:49.0  2.545   282.040   492.160  11.635  0.002
*               R           22:26:36.0  2.555   283.440   489.460  10.896  0.001
*               I           22:30:57.0  2.612   283.460   489.920  11.695  0.002
HD217014        V           22:42:48.0  1.996   700.340   774.720   8.768  0.001
*               R           22:43:25.0  2.000   701.010   774.780   8.170  0.001
*               I           22:43:54.0  2.004   703.100   773.920   9.096  0.002
HD5612          V           22:49:06.0  1.690   636.750   238.530   9.775  0.001
*               R           22:50:07.0  1.693   638.490   239.130   8.891  0.002
*               I           22:50:31.0  1.695   639.230   238.360   9.901  0.002


I have attempted to retrace the steps of this procedure with slightly simpler transformation equations (without the last term, the one including both colour and airmass) but the results are effectively the same.

***

It has occurred to me that it might not be the actual photcal procedure that has me wrong but rather that the photometry itself is somehow in error. Looking for instance at the HD5612 observations, my photometry (through daophot/allstar) yields for magnitudes:

cl> pdump HD5612*good.phot image,mag yes
HD5612_I_1.fit  9.901
HD5612_R_1.fit  8.891
HD5612_V_1.fit  9.775


But looking at the catalog values for that star...

cl> type std.catalog
# CATALOG: std.catalog
# NCOLS: 5
# HDRLENGTH: 63
# 
# ID               V           BV          VR          RI        
# 15               10          10          10          10        

  HD5612           6.32        0.90        0.462       0.421
(...)


...it would seem that, looking only at the differences in magnitudes between colours, that something is a bit odd. As I read the catalog HD5612 is faintest in V, then somewhat brighter in R and yet somewhat brighter in I. But my photometry has V and I roughly equal, with R about one magnitude brighter than both? I can see how that would confuse the photcal procedures later on! Of course airmass is not accounted for, but the images were taken after one another on very short exposures so that couldn't make up such a difference.

Having briefly reviewed my photometry scripts, I couldn't see anything wrong so somewhat lost at the moment. But I've probably added enough questions for the time being anyhow, and will conclude this post for the time being.

Thanks for your help, it would be a very good thing if I could get this sorted one way or the other quite soon.

Fenris wrote on Jul 12, 2007

Allright, it seems I got it sorted out at last. Indeed the error seems to have been not with my photometry, nor with my photcal usage, but rather with my eyes. It turns out I have actually done my photometry on the wrong stars (!) in not one, but two of the five images. That'll have got it quite wrong of course and the fact that I did not realize until now has left me feeling thoroughly silly.

Using the right stars, the magnitudes I obtain with photcal are:

cl> type std.calib

# Tue 19:28:57 14-Aug-2007
# List of observations files:
#               std.obs
# Config:       std.config
# Parameters:   std.params
#
# Computed indices for program and standard objects
#
# Columns: 
#       1       object id
#       2       V
#       3       error(V)
#       4       VR
#       5       error(VR)
#       6       VI
#       7       error(VI)


BD+28-4211 10.522  0.027   -0.150  0.034   -0.322  0.051  
HD186408   6.024   0.002   0.375   0.002   0.723   0.002  
HD217014   5.455   0.002   0.373   0.002   0.699   0.002  
HD5612     6.283   0.002   0.447   0.003   0.862   0.002  


To compare with catalog values:

cl> type std.catalog
# CATALOG: std.catalog
# NCOLS: 5
# HDRLENGTH: 63
# 
# ID               V           BV          VR          RI        
# 15               10          10          10          10        

  HD5612           6.32        0.90        0.462       0.421     
  HD217014         5.455       0.67        0.373       0.326     
  HD195919         8.981       0.05        0.031       0.038     
  HD186408         5.980       0.648       0.357       0.341     
  BD+28-4211       10.53       -0.34       -0.147      -0.17    


The reason there are only four stars in the .calib file is one of the standard stars I meant to do photometry on was not even in the image and so is left out. All discrepancies are now within 0.05 mag between catalog values and what was obtained backtracking with photcal, which feels reasonable to me.

Last post on Jul 12, 2007