Skip to content

Commit

Permalink
Merge pull request #70 from hamogu/saosac_color_rays
Browse files Browse the repository at this point in the history
Remove obsolete parameter SAOSAC_color_rays
  • Loading branch information
hamogu authored Nov 21, 2023
2 parents 8cbe9a3 + a1c2c8b commit 2943c63
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 37 deletions.
53 changes: 17 additions & 36 deletions marx/libsrc/s-saosac.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ static int File_Has_Time_Column;
static double Wgts_Scale_Factor = 1.0;
#endif

static int Use_Color_Rays = 0;

#if SCALE_SAOSAC_WEIGHTS
static int compute_weights_scale_factor (char *file, double *wp)
{
Expand Down Expand Up @@ -257,31 +255,24 @@ static int saosac_create_photons (Marx_Source_Type *st, Marx_Photon_Type *pt, /*
else
at->mirror_shell = 0;

if (Use_Color_Rays)
{
if (-1 == (*efun) (&st->spectrum, &at->energy))
return -1;
}
if (File_Has_Time_Column)
{
if (Start_Time == 0)
{
Start_Time = buf[8];
_marx_dither_set_ray_tstart (Start_Time);
}
this_time = buf[8] - Start_Time;
}
else
{
if (File_Has_Time_Column)
{
if (Start_Time == 0)
{
Start_Time = buf[8];
_marx_dither_set_ray_tstart (Start_Time);
}
this_time = buf[8] - Start_Time;
}
else
this_time += 1.0;

if (this_time < 0)
continue;

at->energy = buf[6];
at->arrival_time = this_time;
}
this_time += 1.0;

if (this_time < 0)
continue;

at->energy = buf[6];
at->arrival_time = this_time;


at++;
num_read++;
Expand Down Expand Up @@ -332,12 +323,6 @@ int marx_select_saosac_source (Marx_Source_Type *st, Param_File_Type *p, /*{{{*/
}
else Start_Time = 0;

#if 0
if (-1 == pf_get_boolean (p, "SAOSAC_Color_Rays", &Use_Color_Rays))
return -1;
#endif
Use_Color_Rays = 0; /* nolonger supported */

#if SCALE_SAOSAC_WEIGHTS
Wgts_Scale_Factor = 1.0;
if (-1 == pf_get_boolean (p, "SAOSAC_Scale_Wgts", &scale_wgts))
Expand All @@ -355,10 +340,6 @@ int marx_select_saosac_source (Marx_Source_Type *st, Param_File_Type *p, /*{{{*/

Saosac_Bin_Table = bt;

if (Use_Color_Rays)
{
return _marx_get_simple_specrum_parms (p, st, name);
}
st->spectrum.type = MARX_SAOSAC_SPECTRUM;

return 0;
Expand Down
1 change: 0 additions & 1 deletion marx/par/marx.par
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ UserSourceArgs,s,a,"pnts.dat",,,"user source parameter"
# This option allows SAOSAC FITS raytrace files to be used.
#
SAOSACFile,s,a,"saosac.fits",,,"marx input source/output ray filename"
SAOSAC_Color_Rays,b,a,no,,,"This option is no longer supported"
#
# SIMPUT Source parameters
#
Expand Down

0 comments on commit 2943c63

Please sign in to comment.