Skip to content
Snippets Groups Projects
Commit dc58f0b7 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

further simplifying datamodel

parent 5745226d
No related branches found
No related tags found
No related merge requests found
Pipeline #6985 passed
......@@ -71,11 +71,7 @@ class Observation(TaskObject):
starttime = models.DateTimeField('start time', null=True)
endtime = models.DateTimeField('end time', null=True)
# beamPattern is used to understand how many beams (dataproducts) must be created
beamPattern = models.CharField(max_length=50, null=True)
# can be used to distinguish types of observations, like for ARTS.
process_type = models.CharField(max_length=50, default="observation")
observing_mode = models.CharField(max_length=50, default="imaging")
# json object containing unmodelled parameters that are used by the 'executor' service
......@@ -84,13 +80,11 @@ class Observation(TaskObject):
field_ra = models.FloatField('field_ra', null = True)
field_dec = models.FloatField('field_dec', null = True)
control_parameters = models.CharField(max_length=255, default="unknown", null=True)
telescopes = models.CharField(max_length=100, default="all", null=True)
metadata = models.CharField(max_length=255, default="unknown", null=True)
skip_auto_ingest = models.BooleanField(default=False)
beams = models.CharField(max_length=255, default="0..39")
quality = models.CharField(max_length=30, default="unknown")
ingest_progress = models.CharField(max_length=40, default="", null=True)
progress = models.CharField(max_length=40, default="", null=True)
# this translates a view-name (from urls.py) back to a url, to avoid hardcoded url's in the html templates
# bad : <td><a href="/atdb/observations/{{ observation.id }}/" target="_blank">{{ observation.taskID }} </a> </td>
......
......@@ -50,12 +50,12 @@ class ObservationSerializer(serializers.ModelSerializer):
class Meta:
model = Observation
fields = ('id','task_type', 'name', 'process_type','taskID','beamPattern',
fields = ('id','task_type', 'name','taskID',
'field_name','field_ra','field_dec',
'creationTime','starttime','endtime', 'duration', 'size',
'my_status','new_status','status_history',
'generated_dataproducts','telescopes',
'data_location', 'node','control_parameters',
'generated_dataproducts',
'data_location', 'node','metadata',
'skip_auto_ingest','observing_mode','beams',
'quality','ingest_progress')
'quality','progress')
......@@ -46,7 +46,7 @@
</div>
{% include 'taskdatabase/pagination.html' %}
</div>
<p class="footer"> Version 2.0.0 (15 dec 2020 - 09:00)</p>
<p class="footer"> Version 2.0.0 (15 dec 2020 - 14:00)</p>
<script type="text/javascript">
(function(seconds) {
......
......@@ -32,7 +32,6 @@ class ObservationFilter(filters.FilterSet):
model = Observation
fields = {
'process_type': ['exact', 'in', 'icontains'], #/atdb/observations?&process_type=observation
'observing_mode': ['exact', 'in', 'icontains', 'startswith'], # /atdb/observations/?observing_mode__icontains=arts
'field_ra': ['gt', 'lt', 'gte', 'lte', 'contains', 'exact'],
'field_dec': ['gt', 'lt', 'gte', 'lte', 'contains', 'exact'],
......@@ -44,8 +43,8 @@ class ObservationFilter(filters.FilterSet):
'endtime': ['gt', 'lt', 'gte', 'lte', 'contains', 'exact'],
'data_location': ['exact', 'icontains'],
'node': ['exact', 'in'],
'metadata': ['icontains'],
'skip_auto_ingest': ['exact'],
'beams': ['exact', 'icontains'],
'quality': ['exact', 'icontains'],
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment