Calculate Earth illumination of the ACIS radiator.
The key components are:
Untar the package tar file in a working directory:
tar zxvf /proj/sot/ska/export/taco-<version>.tar.gz
cd taco-<version>
Calculate Earth illumination of the ACIS radiatiator over a specified interval of time.
-h, --help show this help message and exit
--tstart=TSTART Start time
--tstop=TSTOP Stop time
--ephemfile=EPHEMFILE
Orbit ephemeris file containing start and stop times
--out=OUT Output root name
--sample=SAMPLE Sample
--ngrid=NGRID Number of rays to illuminate Earth disk
--nproc=NPROC Number of processors to use
--verbose Print verbose output
--movie Create visibility images for making a movie
The time inputs are tstart and tstop. These can be in any format supported by Chandra.Time.
The orbital ephemeris covering that time range must be supplied in a single file specified by ephemfile. Normally that would be a CXC ORBITEPHEM file, but any file (FITS or ASCII) with the columns Time, X, Y, Z will work.
The output root is given by out. Output files are out.png (illumination vs. time) and out.fits (illumination data). If movie is selected then the visibility images are put in a directory out/.
The illumination calculations will be for one out of each sample values. The default for sample is 2 and the normal time period of CXC ephemeris files is 300 seconds. That implies an output value each 600 seconds.
The number of rays projected toward the Earth is given by ngrid. Rays are only projected toward the “cap” on the surface which would be visible if there were no occultation by the ACIS sun shade. The default is 100 which gives decent resolution over the surface. For making high-resolution movies that could be increased, while for quick calculations a value of 50 might be sufficient.
The number of CPU processors that are used is given by nproc. Default is 4.
The movie option implies creating a visibility image at each time step. To prevent accidentally making a huge number of images the program will stop if an attempt is made to create more than 250 frames.
The tar file includes an orbital ephemeris file orbitf352123502N001_eph0.fits covering 2009:059 to 2009:128 inclusive.
This is a raytrace code so run it on your fastest multicore machine!
Calculate illumination for a week:
./acis_rad_illum.py --tstart=2009:060:00:00:00 --tstop=2009:067:00:00:00 --out=2009_060_067 --sample=4
gthumb 2009_060_067.png
dmlist 2009_060_067.fits cols
This should result in a plot like
You might get some ominous looking error message like:
Exception exceptions.OSError: (2, 'No such file or directory', '/tmp/tmp_nnyXP.fits')
in <bound method _TemporaryFileWrapper.__del__ of <closed file '<fdopen>',
mode 'rb+' at 0x2c58b70>> ignored
Fear not, this is benign. It is related to the multiprocessing but I haven’t figured out how to get rid of it yet.
Make a movie of a perigee pass:
./acis_rad_illum.py --tstart 2009:063:06:00:00 --tstop 2009:063:12:00:00 --out 2009_063_movie --movie
convert -delay 30 2009_063_movie/*.png -loop 0 2009_063_movie.gif
gthumb 2009_063_movie.gif
This should give a movie like below (except this was made with -loop 1 so refresh your browser to see it go):
Note: command line options can use the “=” (equals sign) or not depending on your preference.
Define geometry for ACIS radiator and sunshade and perform raytrace calculation of Earth illumination on the radiator surface.
Calculate the relative Earth visibility for the ACIS radiator given the Chandra orbit position p_chandra_eci and attitude chandra_att.
The relative visibility is normalized so that 1.0 represents the entire radiator having visibility toward the surface point and being exactly normal toward the surface.
Total illumination gives the effective solid angle (steradians) of the visible Earth from the radiator perspective. It is averaged over the different points on the radiator.
Parameters: |
|
---|---|
Returns: | relative visibility, total illumination, projected rays |
Determine if the line l intersects the plane p.
Return type: | boolean |
---|
Calculate approximately uniform spherical grid of rays containing ngrid points and extending over the opening angle open_angle (radians).
Returns: | numpy array of unit length rays, grid area (steradians) |
---|