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_datastellarphot.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, .csv or .tsv suffix.

headerstellarphot.settings.AAVSOSubmissionHeader

Header parameters. Only date_format="JD" is supported in v1.

target_star_idstr or int

The star_id value identifying the target rows in phot_data.

target_namestr

The string written into the STARID column for every target row.

check_star_idstr or int

The star_id value identifying the check-star rows.

check_namestr

The string written into the KNAME column.

chartstr

The AAVSO chart sequence ID written into the CHART column.

mag_columnstr

Name of the column in phot_data containing 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_data containing the magnitude error.

transbool, optional

True to emit TRANS=YES, False (default) for TRANS=NO.

groupint or None, optional

Optional grouping identifier. None (default) emits GROUP=na.

notesstr, optional

Text written into the NOTES column. 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; False raises ValueError. If dropping leaves no rows to write, ValueError is raised regardless.