[AstroPy] two columns with two character delimiter
Kathleen Labrie
kathleen.labrie at noirlab.edu
Thu Aug 18 21:51:17 EDT 2022
Azalee,
The wording in the instructions is confusing. I checked with someone here
at Gemini.
"Two space-separated columns: (1) wavelength in nm and (2) flux density in
arbitrary units"
The meaning is 2 columns separated with a space (no restriction on the
number of space "character"), not columns separated by exactly 2 spaces.
:) Someone is already on it to fix the wording.
That being said, I'm still interested in the technical Python question.
Kathleen
On Thu, Aug 18, 2022 at 2:19 PM Azalee Bostroem <abostroem at gmail.com> wrote:
> Hi,
>
> The Gemini ITC requires a user defined spectrum to have columns separated
> by two spaces. Does anyone know how to write out an astropy table with this
> format? I tried the following:
>
> - format='ascii': this writes out columns separated by a space
> - delimiter=' ': this produces an error, delimiters are required to
> be one character
> - format='fixed_width', delimiter_pad=' ': the produces a variable
> number of spaces between columns since each number doesn’t have an
> identical number of digits
> - format='ascii', delimiter_pad=' ': this produces an error,
> delimiter_pad is only a keyword for fixed_width format
>
>
> I know there are ways to do with outside of Table.write, but I’m curious
> if there is a way to achieve this format with Table.write?
>
> Thanks,
> Azalee
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20220818/371918fd/attachment.html>
More information about the AstroPy
mailing list