Ticket #22 (closed task: fixed)

Opened 2 years ago

Last modified 1 year ago

Refactor: Add .writefits() method to Spectrum and SpectralElement classes

Reported by: laidler Assigned to: laidler
Priority: normal Milestone: Pysynphot: user-friendly interface
Component: pysynphot Version:
Severity: normal Keywords:
Cc:

Description (Last modified by laidler)

Presently there is a SpectrumWriter? class defined and used by the ETC module. This should be refactored; spectra and spectral elements should know how to write themselves to FITS files.

Added .writefits(self,filename,clobber=True,trimzero=True) method to SourceSpectrum? class with r175. A .writefits() method for the SpectralElement? class would be so similar that it seems we ought to provide one to the parent Integrator class, that could be called by the two subclasses with appropriate arguments.

Change History

03/22/07 10:39:28 changed by laidler

  • component changed from asciidata to specman.
  • milestone set to Specman: user-friendly interface.

03/28/07 16:05:59 changed by laidler

  • status changed from new to assigned.
  • owner changed from somebody to laidler.
  • description changed.
  • summary changed from Refactor: Add .writeto() method to Spectrum and SpectralElement classes to Refactor: Add .writefits() method to Spectrum and SpectralElement classes.

Changed .writeto() to .writefits() so that we can add other formats later. Updated progress.

11/16/07 15:19:33 changed by laidler

  • status changed from assigned to closed.
  • resolution set to fixed.

Turns out this was needed to support the cos_etccalc. r691 implements the method in the SpectralElement? class (independently of the SourceSpectrum? class; ie, no refactoring was done at this time).