Skip to content

Commit

Permalink
add obsid to obs_status.yml file, since that is easier to handle for …
Browse files Browse the repository at this point in the history
…reviewer
  • Loading branch information
javierggt committed Mar 22, 2021
1 parent 836244b commit c236715
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agasc/supplement/magnitudes/update_mag_supplement.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ def write_obs_status_yaml(obs_stats=None, fails=(), filename=None):
rows.sort(keys='agasc_id')
obs.append({
'mp_starcat_time': mp_starcat_time,
'obsid': obs_stats['obsid'],
'agasc_id': list(rows['agasc_id']),
'status': 1,
'comments': obs_stats['comment']
Expand All @@ -322,6 +323,7 @@ def write_obs_status_yaml(obs_stats=None, fails=(), filename=None):
for mp_starcat_time in mp_starcat_times:
obs.append({
'mp_starcat_time': mp_starcat_time,
'obsid': fail['obsid'],
'agasc_id': [agasc_id],
'status': 1,
'comments': fail['msg']
Expand All @@ -332,6 +334,7 @@ def write_obs_status_yaml(obs_stats=None, fails=(), filename=None):
yaml_template = """obs:
{%- for obs in observations %}
- mp_starcat_time: {{ obs.mp_starcat_time }}
obsid: {{ obs.obsid }}
status: {{ obs.status }}
agasc_id: [{% for agasc_id in obs.agasc_id -%}
{{ agasc_id }}{%- if not loop.last %}, {% endif -%}
Expand Down

0 comments on commit c236715

Please sign in to comment.