-- $Id: lmc_x1.lua,v 1.3 1999/06/30 18:38:21 dj Exp $ -- raygen specification for LMC X1 -- -- The following global variables are optional; defaults are set by -- raygen: -- -- z -> the position of the source. 0 is at CAP datum A, -- z increases from the source to the focal plane -- theta -> the radial position of the source in the sky, in -- minutes of arc -- phi -> the azimuthal angle of the source, in degrees override( ) function source( ) local pfx = 'lmc_x1.lua: ' local attrs = {} local deg2rad = 3.14159265358979/180.0 local arcsec2rad = deg2rad / 3600 local arcmin2rad = deg2rad / 60 if ( nil ~= z ) then attrs['z'] = z end if ( nil ~= theta ) then attrs['theta'] = theta * arcmin2rad end if ( nil ~= phi ) then attrs['phi'] = phi * deg2rad end begin_source( "s1" ) spectrum('lmc_x1', { file='/proj/axaf/simul/databases/sources/lmc_x1.rdb', format='rdb', units='photons/s/cm2', scale=1 }) point( "source", attrs ) end_source( "s1" ) end