Skip to content

Transform an ASCII two columns file into a FITS Spectrum

License

Notifications You must be signed in to change notification settings

MatheusJCastro/ascii2fits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

ASCII2FITS

Written by: Matheus J. Castro
Under MIT License

Objevtive

This program will convert your ASCII two columns table files into a FITS Spectrum compatible with IRAF.
You simply provide an extension type and a folder name (absolute or relative) and the code will automatically look for all files with that extension inside the folder.
The FITS files will be created at the same hierarchy that the original file.

Running

First, add execute privileges to the .py file. In linux, this can be achieved with chmod +x ascii2fits.py.

To run the code, provide two arguments:

  • Name of the folder for the program search for ascii files;
  • Name of the extension to search for.

Example: ./ascii2fits.py folder_name .txt

File Structure

  1. The first column must be wavelength values;
  2. and the second one, flux values.

By default, the code skips the first two lines of the file, be aware of that!

About

Transform an ASCII two columns file into a FITS Spectrum

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages