• caliApply
  • LcaliApply
  • nLcaliApply
  • nLcaliInvert
  • caliInvert
  • LcaliInvert
  • cnts2Lup
  • lup2Cnts
  • tclCali.c

    ABSTRACT:
    
    TCL bindings for applying photometric calibrations
    
    

    caliApply

     C ROUTINE CALLED:
     atCaliApply in atCali.c
     
    
    TCL SYNTAX:
      caliApply  "<counts>" "<countsErr>" "<cCounts>" "<cCountsErr>" "<intTime>" "<cIntTime>" "<airmass>" "<zeropt>" "<extinct>" "<colorTerm>" "<secColorTerm>" "<sign>" "<cosmicColor>" "<cosmicError>" "-zpAirmass" "-zpColor" 
    
    TCL HELP STRING:
      Apply the calibration to the observed counts to yield a magnitude:  
    RETURN:  a keyed list of calMag, calMagErr, status, and retInt
    
    TCL ARGUMENTS:
                     : 
      "<counts>"   : number of counts in the reference filter
      "<countsErr>" : error in counts
      "<cCounts>"  : number of counts in the adjacent filter
      "<cCountsErr>" : error in cCounts
      "<intTime>"  : exposure time in the reference filter (seconds)
      "<cIntTime>" : exposure time in the adjacent filter (seconds)
      "<airmass>"  : airmass:  sec of the zenith angle
      "<zeropt>"   : magnitude zeropoint for the reference filter (a')
      "<extinct>"  : extinction  for the reference filter (k')
      "<colorTerm>" : color term (b')
      "<secColorTerm>" : second order color term (c')
      "<sign>"     : usually +1 for u g r i and -1 for z
      "<cosmicColor>" : typical color (reference-adjacent)
      "<cosmicError>" : error in cosmicColor
      "-zpAirmass"   : zeropoint airmass for c term; default=0.0
      "-zpColor"     : zeropoint color for c term; default=0.0
    
    

    LcaliApply

     C ROUTINE CALLED:
      atLCaliApply in atCali.c
    
    
    TCL SYNTAX:
      LcaliApply  "<counts>" "<countsErr>" "<cCounts>" "<cCountsErr>" "<intTime>" "<cIntTime>" "<airmass>" "<zeropt>" "<extinct>" "<colorTerm>" "<secColorTerm>" "<sign>" "<cosmicColor>" "<cosmicError>" 
    
    TCL HELP STRING:
      Apply the calibration to the observed counts to yield a luptitude:  
    RETURN:  a keyed list of calMag, calMagErr, status, and retInt
    
    TCL ARGUMENTS:
                     : 
      "<counts>"   : number of counts in the reference filter
      "<countsErr>" : error in counts
      "<cCounts>"  : number of counts in the adjacent filter
      "<cCountsErr>" : error in cCounts
      "<intTime>"  : exposure time in the reference filter (seconds)
      "<cIntTime>" : exposure time in the adjacent filter (seconds)
      "<airmass>"  : airmass:  sec of the zenith angle
      "<zeropt>"   : magnitude zeropoint for the reference filter (a')
      "<extinct>"  : extinction  for the reference filter (k')
      "<colorTerm>" : color term (b')
      "<secColorTerm>" : second order color term (c')
      "<sign>"     : usually +1 for u g r i and -1 for z
      "<cosmicColor>" : typical color (reference-adjacent)
      "<cosmicError>" : error in cosmicColor
    
    

    nLcaliApply

     C ROUTINE CALLED:
      atnLCaliApply in atCali.c
    
    
    TCL SYNTAX:
      nLcaliApply  "<counts>" "<countsErr>" "<cCounts>" "<cCountsErr>" "<intTime>" "<cIntTime>" "<airmass>" "<zeropt>" "<extinct>" "<colorTerm>" "<filterIndex>" "-secColorTerm" "-cosmicColor" "-cosmicError" "-zpAirmass" "-zpColor" "-faintbprime" "-maggies" 
    
    TCL HELP STRING:
      Apply the calibration to the observed counts to yield a luptitude:  
    RETURN:  a keyed list of calMag, calMagErr, status, and retInt
    
    TCL ARGUMENTS:
                     : 
      "<counts>"   : number of counts in the reference filter
      "<countsErr>" : error in counts
      "<cCounts>"  : number of counts in the adjacent filter
      "<cCountsErr>" : error in cCounts
      "<intTime>"  : exposure time in the reference filter (seconds)
      "<cIntTime>" : exposure time in the adjacent filter (seconds)
      "<airmass>"  : airmass:  sec of the zenith angle
      "<zeropt>"   : magnitude zeropoint for the reference filter (a)
      "<extinct>"  : extinction  for the reference filter (k)
      "<colorTerm>" : color term (b)
      "<filterIndex>" : determines which luptitude b prime to use; 0=u', 1=g', 2=r', 3=i', 4=z'
      "-secColorTerm" : second order color term (c), (default(fI)= -0.021,-0.016,-0.004,0.006,0.003
      "-cosmicColor" : typical instrumental color (reference-adjacent), default(i)=2.29,0.70,0.10,-1.3,-1.3
      "-cosmicError" : error in cosmicColor
      "-zpAirmass"   : zeropoint airmass for c term; default=1.3
      "-zpColor"     : zeropoint instrumental color for c term; default(filterIndex)=2.29,0.70,0.10,-1.3,-1.3
      "-faintbprime" : if > 0, then use the given bprime default is filter specific
      "-maggies"     : if =1, then return maggies (linear flux units where maggie=1 <--> mag=0.0), if = 2, then return approximate Jy value
    
    

    nLcaliInvert

     C ROUTINE CALLED:
      atnLCaliInvert in atCali.c
    
    
    TCL SYNTAX:
      nLcaliInvert  "<calMag>" "<calMagErr>" "<filterIndex>" "-faintbprime" "-Jy" "-flux0" 
    
    TCL HELP STRING:
      Apply the inverse luptitude to get a maggies:  
    RETURN:  maggies, maggiesErr
    
    TCL ARGUMENTS:
                     : 
      "<calMag>"   : asinh magnitude
      "<calMagErr>" : asinh magnitude error (in mags)
      "<filterIndex>" : determines which luptitude b' knee to use; 0=u', 1=g', 2=r', 3=i', 4=z'
      "-faintbprime" : if > 0, then use the given b' knee, the default is filter specific
      "-Jy"          : if present then return Janskys instead of maggies (linear flux units where maggie=1 <--> mag=0.0)
      "-flux0"       : if >0 and -Jy on, then return a flux in Jy which is maggies * this flux0 val (default 3630.78Jy = 1.0 maggie)
    
    

    caliInvert

     C ROUTINE CALLED:
      atCaliInvert in atCali.c
    
    
    TCL SYNTAX:
      caliInvert  "<calMag>" "<cCalMag>" "<intTime>" "<airmass>" "<zeropt>" "<extinct>" "<colorTerm>" "<secColorTerm>" "<sign>" "-zpAirmass" "-zpColor" 
    
    TCL HELP STRING:
      Invert the calibration to the observed counts to yield a magnitude:  
    RETURN:  a keyed list of calMag, calMagErr, status, and retInt
    
    TCL ARGUMENTS:
                     : 
      "<calMag>"   : calibrated magnitude in this band
      "<cCalMag>"  : calibrated magniude in the adjacent band
      "<intTime>"  : exposure time in the reference filter (seconds)
      "<airmass>"  : airmass:  sec of the zenith angle
      "<zeropt>"   : magnitude zeropoint for the reference filter (a')
      "<extinct>"  : extinction  for the reference filter (k')
      "<colorTerm>" : color term (b')
      "<secColorTerm>" : second order color term (c')
      "<sign>"     : usually +1 for u g r i and -1 for z
      "-zpAirmass"   : zeropoint airmass for c term; default=0.0
      "-zpColor"     : zeropoint color for c term; default=0.0
    
    

    LcaliInvert

     C ROUTINE CALLED:
      atLCaliInvert in atCali.c
    
    
    TCL SYNTAX:
      LcaliInvert  "<calMag>" "<cCalMag>" "<intTime>" "<airmass>" "<zeropt>" "<extinct>" "<colorTerm>" "<secColorTerm>" "<sign>" 
    
    TCL HELP STRING:
      Invert the calibration on the luptitude to yield the observed counts:  
    RETURN:  a keyed list of calMag, calMagErr, status, and retInt
    
    TCL ARGUMENTS:
                     : 
      "<calMag>"   : calibrated luptitude in this band
      "<cCalMag>"  : calibrated luptitude in the adjacent band
      "<intTime>"  : exposure time in the reference filter (seconds)
      "<airmass>"  : airmass:  sec of the zenith angle
      "<zeropt>"   : magnitude zeropoint for the reference filter (a')
      "<extinct>"  : extinction  for the reference filter (k')
      "<colorTerm>" : color term (b')
      "<secColorTerm>" : second order color term (c')
      "<sign>"     : usually +1 for u g r i and -1 for z
    
    

    cnts2Lup

     C ROUTINE CALLED:
      atLupApply in atCali.c
    
    
    TCL SYNTAX:
      cnts2Lup  "<counts>" "<countserr>" 
    
    TCL HELP STRING:
      Convert counts to Luptitudes:  
    RETURN:  a keyed list of Luptitude and error
    
    TCL ARGUMENTS:
                     : 
      "<counts>"   : counts
      "<countserr>" : error in the counts
    
    

    lup2Cnts

     C ROUTINE CALLED:
      atLupApply in atCali.c
    
    
    TCL SYNTAX:
      lup2Cnts  "<Luptitude>" "<LuptitudeErr>" 
    
    TCL HELP STRING:
      Convert Luptitudes to counts:  
    RETURN:  a keyed list of counts and error
    
    TCL ARGUMENTS:
                     : 
      "<Luptitude>" : Luptitude
      "<LuptitudeErr>" : error in the Luptitude