photom.c 26.9 KB
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
    obj2->magerr_win = obj2->flux_win>0.0?
			 1.086*obj2->fluxerr_win/obj2->flux_win
			:99.0;
/* Mag. GALFIT */
  if (FLAG(obj2.mag_galfit))
    obj2->mag_galfit = obj2->flux_galfit>0.0?
			 -2.5*log10(obj2->flux_galfit) + prefs.mag_zeropoint
			:99.0;
  if (FLAG(obj2.magerr_galfit))
    obj2->magerr_galfit = obj2->flux_galfit>0.0?
			 1.086*obj2->fluxerr_galfit/obj2->flux_galfit
			:99.0;

1014
/* Other surface brightnesses */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1015
1016
1017
  if (FLAG(obj2.maxmu))
    outobj2.maxmu = obj->peak > 0.0 ?
		-2.5*log10((obj->peak)
1018
1019
1020
		 / (prefs.pixel_scale? field->pixscale*field->pixscale
				: obj2->pixscale2 * 3600.0*3600.0))
		+ prefs.mag_zeropoint
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1021
1022
1023
1024
1025
		: 99.0;

  if (FLAG(obj2.threshmu))
    obj2->threshmu = obj->thresh > 0.0 ?
		-2.5*log10((obj->thresh)
1026
1027
1028
		 / (prefs.pixel_scale? field->pixscale*field->pixscale
				: obj2->pixscale2 * 3600.0*3600.0))
		+ prefs.mag_zeropoint
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1029
1030
		: 99.0;

1031

Emmanuel Bertin's avatar
Emmanuel Bertin committed
1032
1033
1034
1035
  return;
  }

For faster browsing, not all history is shown. View entire blame