IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 7, 2008, 10:55:21 AM (18 years ago)
Author:
eugene
Message:

fix errors with star density normalizations and flux consistency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimStars.c

    r14667 r17557  
    2626    return galaxy;
    2727}
     28
     29float ppSimStarSkyNoise (float skySigma, float seeingSigma) {
     30
     31    float skyNoise = skySigma * sqrt(4*M_PI*PS_SQR(seeingSigma));
     32    return skyNoise;
     33}
     34
     35float ppSimStarPeakToFlux (float peak, float seeingSigma) {
     36
     37    float psfArea = 2.0*M_PI*PS_SQR(seeingSigma);
     38    float flux = peak * psfArea;
     39    return flux;
     40}
     41
     42float ppSimStarFluxToPeak (float flux, float seeingSigma) {
     43
     44    float psfArea = 2.0*M_PI*PS_SQR(seeingSigma);
     45    float peak = flux / psfArea;
     46    return peak;
     47}
     48
     49float ppSimFluxToMag (float flux, float zp) {
     50
     51    float mag = -2.5*log10(flux) + zp;
     52    return mag;
     53}
     54
     55float ppSimMagToFlux (float mag, float zp) {
     56
     57    float flux = powf (10.0, -0.4*(mag - zp));
     58    return flux;
     59}
Note: See TracChangeset for help on using the changeset viewer.