Live Chat Software by Kayako |
How can I save an FTS spectrum to an ascii file
Posted by Mark Kidger, Last modified by Mark Kidger on 22 May 2019 02:43 PM
|
|
The HSC has created a short videotutorial (6 minutes) on how to save an FTS spectrum to a csv file. It's available on the Herschel Academy YouTube channel on the following link: Saving SPIRE FTS spectra as 1D CSV or ASCII files The HIPE script from the video is copied below. To run it, you need to be logged in to the HSA. ### example HIPE script obsid = 1342268315 obs = getObservation(obsid,useHsa=True,instrument='SPIRE') # point_spectrum = obs.level2.getProduct("HR_spectrum_point") ext_spectrum = obs.level2.getProduct("HR_spectrum_ext") # asciiTableWriter(table=point_spectrum["0000"]["SSWD4"], file='/Users/ivaltcha/test_spec_sswd4.csv') asciiTableWriter(table=point_spectrum["0000"]["SLWC3"], file='/Users/ivaltcha/test_spec_slwc3.csv') #### end script For a simple ASCII file you can also view your spectrum in the Editor window in the HSA. Right click on the spectrum that you wish to save and select "Send to" --> "Text file" in the pop-up menu. These instructions are also shown in the short videotutorial referenced above. | |
|
Comments (0)