Skip to content

Commit

Permalink
Documented default exposure time/SNR settings for ephems
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Gray committed Oct 24, 2020
1 parent 3754f2b commit f26367b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions environ.def
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,11 @@ MAG_DIGITS=1
digits. Increment FULL_SIGMAS, and you get an extra digit of
precision in both sigmas and in (most) 'covar.txt' values.
FULL_SIGMAS=3

In computing SNRs in ephemerides, Find_Orb defaults to assuming
30-second exposures. That can be modified below.
EXPTIME=30

In computing exposure durations in ephemerides, Find_Orb defaults
to assuming a target SNR=4. That can be modified below.
SNR=4
6 changes: 4 additions & 2 deletions ephem0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2626,8 +2626,9 @@ int ephemeris_in_a_file( const char *filename, const double *orbit,
}
else
{
const double exp_time = atof( get_environment_ptr( "EXPTIME"));
const double snr = snr_from_mag_and_exposure( &exposure_config,
curr_mag, atof( get_environment_ptr( "EXPTIME")));
curr_mag, (exp_time ? exp_time : 30.));
const char *fmt = (snr > 99. ? " %5.0f" : " %5.2f");

snprintf( tbuff, sizeof( tbuff), fmt, snr);
Expand All @@ -2638,13 +2639,14 @@ int ephemeris_in_a_file( const char *filename, const double *orbit,

if( options & OPTION_EXPOSURE_TIME)
{
const double target_snr = atof( get_environment_ptr( "SNR"));
double exposure_time;

if( exposure_config.airmass > 1e+9)
exposure_time = 99999.;
else
exposure_time = exposure_from_snr_and_mag( &exposure_config,
atof( get_environment_ptr( "SNR")), curr_mag);
(target_snr ? target_snr : 4.), curr_mag);
if( exposure_time > 99999.)
exposure_time = 99999.;
snprintf_append( alt_buff, sizeof( alt_buff), " %.1f", exposure_time);
Expand Down

0 comments on commit f26367b

Please sign in to comment.