write_aavso_extended#
- stellarphot.io.write_aavso_extended(phot_data, path, *, header, target_star_id, target_name, check_star_id, check_name, chart, mag_column, mag_error_column, trans=False, group=None, notes='na', drop_missing_check=True)[source]#
Write an AAVSO Extended File Format submission for ensemble photometry.
- Parameters:
- phot_data
stellarphot.PhotometryData Table of photometry results. Must contain at least the target star and the check star, paired by
(date-obs, passband).- pathstr or
pathlib.Path Destination file. Must have a
.txt,.csvor.tsvsuffix.- header
stellarphot.settings.AAVSOSubmissionHeader Header parameters. Only
date_format="JD"is supported in v1.- target_star_idstr or int
The
star_idvalue identifying the target rows inphot_data.- target_namestr
The string written into the
STARIDcolumn for every target row.- check_star_idstr or int
The
star_idvalue identifying the check-star rows.- check_namestr
The string written into the
KNAMEcolumn.- chartstr
The AAVSO chart sequence ID written into the
CHARTcolumn.- mag_columnstr
Name of the column in
phot_datacontaining the calibrated magnitude for the target. The same column is read for the check-star rows.- mag_error_columnstr
Name of the column in
phot_datacontaining the magnitude error.- transbool, optional
Trueto emitTRANS=YES,False(default) forTRANS=NO.- groupint or None, optional
Optional grouping identifier.
None(default) emitsGROUP=na.- notesstr, optional
Text written into the
NOTEScolumn. Defaults to"na".- drop_missing_checkbool, optional
How to handle target rows that have no check-star observation at the same
(date-obs, passband).True(default) silently drops those target rows;FalseraisesValueError. If dropping leaves no rows to write,ValueErroris raised regardless.
- phot_data