Commit 6649b83c authored by Cecconi Baptiste's avatar Cecconi Baptiste
Browse files

add columns spectral_bandwith

parent 4ff82a81
......@@ -106,6 +106,13 @@ import astropy.units as u
description="Date of passage of the object at meridian"
ucd="time;obs"/>
<column name="spectral_bandwith_min" type="double precision"
description="Spectral bandwidth of individual spectral sample"
ucd="instr.bandwidth;em.freq;stat.min"/>
<column name="spectral_bandwith_max" type="double precision"
description="Spectral bandwidth of individual spectral sample"
ucd="instr.bandwidth;em.freq;stat.min"/>
<meta name="_associatedDatalinkService">
<meta name="serviceId">dl</meta>
......
......@@ -102,27 +102,6 @@ def access_url(file_name, parent_name, file_type):
if file_type == 'cdf':
root_url = f'http://realtime.obs-nancay.fr/{url_routine_name}'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, file_name)
if file_type == 'rt1':
root_url = f'http://realtime.obs-nancay.fr/{url_routine_name}'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, parent_name+'.RT1')
elif file_type == 'pdf':
root_url = f'http://realtime.obs-nancay.fr/ql_{url_routine_name}/Blue-Red'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, parent_name+'.pdf')
elif file_type == 'pdf_bw':
root_url = f'http://realtime.obs-nancay.fr/ql_{url_routine_name}/B-W'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, parent_name+'.pdf')
elif file_type == 'rt1':
root_url = f'http://realtime.obs-nancay.fr/{url_routine_name}'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, parent_name+'.RT1')
elif file_type == 'png':
root_url = f'http://realtime.obs-nancay.fr/ql_{url_routine_name}/Blue-Red'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, parent_name+'.png')
elif file_type == 'png_bw':
root_url = f'http://realtime.obs-nancay.fr/ql_{url_routine_name}/B-W'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, parent_name+'.png')
elif file_type == 't_png':
root_url = f'http://realtime.obs-nancay.fr/ql_{url_routine_name}/Blue-Red'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, 'T_'+parent_name+'.png')
elif file_type == 't_png_bw':
root_url = f'http://realtime.obs-nancay.fr/ql_{url_routine_name}/B-W'
return '{}/{:04d}/{:02d}/{}'.format(root_url, yy, mm, 'T_'+parent_name+'.png')
......@@ -228,6 +207,8 @@ def nda_metadata(file_cdf):
md['access_estsize'] = os.path.getsize(file_cdf)/1024
md['date_meridian']=str(cdf.attrs['NDA_meridian_time'])
md['spectral_bandwith_min']=float(cdf.attrs['VESPA_spectral_resolution'][0])
md['spectral_bandwith_max']=float(cdf.attrs['VESPA_spectral_resolution'][0])
cdf.close()
......
......@@ -84,5 +84,7 @@ def nda_fits_metadata(fitsfile):
md['publisher']=fitshead["PUBLISHE"]
md['bib_reference']=fitshead["REFERENC"]
md['receiver_name']=fitshead["DSCRPTR"].split('_')[0]
md['spectral_bandwith_min']=md['spectral_sampling_step_min']
md['spectral_bandwith_max']=md['spectral_sampling_step_max']
return md
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment