diff --git a/backend/promis/backend_api/fixtures/init_data.json b/backend/promis/backend_api/fixtures/init_data.json index 33cc05d..3745779 100644 --- a/backend/promis/backend_api/fixtures/init_data.json +++ b/backend/promis/backend_api/fixtures/init_data.json @@ -1,749 +1,1020 @@ -[ -{ - "model": "backend_api.space_projecttranslation", - "pk": 1, - "fields": { - "name": "Potential", - "description": "The space scientific experiment \"Potential\" on the ionosphere aboard the Ukrainian Sich-2 microsatellite (2011-2012)", - "language_code": "en", - "master": 1 - } -}, -{ - "model": "backend_api.space_projecttranslation", - "pk": 2, - "fields": { - "name": "\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b", - "description": "\u041d\u0430\u0443\u043a\u043e\u0432\u0438\u0439 \u0456\u043e\u043d\u043e\u0441\u0444\u0435\u0440\u043d\u0438\u0439 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u0438\u0439 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \"\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\" \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u043e\u0433\u043e \u043c\u0456\u043a\u0440\u043e\u0441\u0443\u043f\u0443\u0442\u043d\u0438\u043a\u0430 \"\u0421\u0456\u0447-2\" (2011-2012)", - "language_code": "uk", - "master": 1 - } -}, -{ - "model": "backend_api.space_projecttranslation", - "pk": 3, - "fields": { - "name": "Variant", - "description": "The space scientific experiment \"Variant\" on the ionosphere aboard the Ukrainian Sich-1M satellite (2004-2005)", - "language_code": "en", - "master": 2 - } -}, -{ - "model": "backend_api.space_projecttranslation", - "pk": 4, - "fields": { - "name": "\u0412\u0430\u0440\u0456\u0430\u043d\u0442", - "description": "\u041d\u0430\u0443\u043a\u043e\u0432\u0438\u0439 \u0456\u043e\u043d\u043e\u0441\u0444\u0435\u0440\u043d\u0438\u0439 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u0438\u0439 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \"\u0412\u0430\u0440\u0456\u0430\u043d\u0442\" \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u043e\u0433\u043e \u0441\u0443\u043f\u0443\u0442\u043d\u0438\u043a\u0430 \"\u0421\u0456\u0447-1\u041c\" (2004-2005)", - "language_code": "uk", - "master": 2 - } -}, -{ - "model": "backend_api.space_project", - "pk": 1, - "fields": { - "klass": [ - "classes.potential.Potential" - ], - "date_start": "2011-08-30", - "date_end": "2012-11-01" - } -}, -{ - "model": "backend_api.space_project", - "pk": 2, - "fields": { - "klass": [ - "classes.variant.Variant" - ], - "date_start": "2005-02-01", - "date_end": "2005-03-25" - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 1, - "fields": { - "name": "Electric probe (EP)", - "description": "Electric probes are intended for the measurement of electric field intensity in space plasma with the help of two similar probes placed at a known distance. Potential project used a single probe setup that can be used to measure the spacecraft's own electric potential.", - "language_code": "en", - "master": 1 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 2, - "fields": { - "name": "\u0415\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u0438\u0439 \u0437\u043e\u043d\u0434 (EP)", - "description": "\u0414\u0430\u0432\u0430\u0447 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u043d\u0430\u043f\u0440\u0443\u0436\u0435\u043d\u043e\u0441\u0442\u0456 \u0437\u043c\u0456\u043d\u043d\u043e\u0433\u043e \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0443 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u0456\u0439 \u043f\u043b\u0430\u0437\u043c\u0456 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0434\u0432\u043e\u0445 \u043f\u043e\u0434\u0456\u0431\u043d\u0438\u0445 \u0434\u0430\u0432\u0430\u0447\u0456\u0432, \u0440\u043e\u0437\u043d\u0435\u0441\u0435\u043d\u0438\u0445 \u043d\u0430 \u0432\u0456\u0434\u043e\u043c\u0443 \u0432\u0456\u0434\u0441\u0442\u0430\u043d\u044c. \u0410\u043b\u0435 \u0432 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u043e\u043c\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0456 \u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b \u0432\u0456\u043d \u0431\u0443\u0432 \u043e\u0434\u0438\u043d :(", - "language_code": "uk", - "master": 1 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 3, - "fields": { - "name": "Neutral gase parameters sensor (NCP)", - "description": "A system of two pressure probes using an inverse-magnetron converter as a sensor. (The device to produce the i/v characteristics from which the ITM team is to obtain the neutral gas density and pressure.)", - "language_code": "en", - "master": 2 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 4, - "fields": { - "name": "\u0414\u0430\u0442\u0447\u0438\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0430\u0437\u0443 \u041d\u041a\u041f", - "description": "\u041d\u041a\u041f \u0441\u043a\u043b\u0430\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u0434\u0432\u043e\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 \u0442\u0438\u0441\u043a\u0443 \u0437 \u0456\u043d\u0432\u0435\u0440\u0441\u043d\u043e-\u043c\u0430\u0433\u043d\u0435\u0442\u0440\u043e\u043d\u043d\u0438\u043c \u043f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0447\u0435\u043c \u0432 \u044f\u043a\u043e\u0441\u0442\u0456 \u0447\u0443\u0442\u043b\u0438\u0432\u043e\u0433\u043e \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443", - "language_code": "uk", - "master": 2 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 5, - "fields": { - "name": "Plasma parameters sensor (ECP)", - "description": "A single cylindrical Langmiur probe measuring 0.05 cm in radius with 12 cm in length along with a protective electrode measuring 0.2 cm in radius and 12.5 cm in length. (The device to produce the i/v characteristics from which the ITM team is to obtain the plasma density and the electron temperature)", - "language_code": "en", - "master": 3 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 6, - "fields": { - "name": "\u0414\u0430\u0442\u0447\u0438\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u043f\u043b\u0430\u0437\u043c\u0438 (\u0415\u041a\u041f)", - "description": "\u041e\u0434\u0438\u043d\u0438\u0447\u043d\u0438\u0439 \u0446\u0438\u043b\u0456\u043d\u0434\u0440\u0438\u0447\u043d\u0438\u0439 \u0437\u043e\u043d\u0434 \u041b\u0435\u043d\u0433\u043c\u044e\u0440\u0430 \u0440\u0430\u0434\u0456\u0443\u043e\u043c 0,05 \u0441\u043c \u0456 \u0434\u043e\u0432\u0436\u0438\u043d\u043e\u044e 12 \u0441\u043c \u0437 \u043e\u0445\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u0434\u043e\u043c \u0440\u0430\u0434\u0456\u0443\u0441\u043e\u043c 0,2 \u0441\u043c \u0434\u043e\u0432\u0436\u0438\u043d\u043e\u044e 12,5 \u0441\u043c", - "language_code": "uk", - "master": 3 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 7, - "fields": { - "name": "Set of 4 Electric probes (EZ1, EZ2, EZ3, EZ4)", - "description": "", - "language_code": "en", - "master": 4 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 8, - "fields": { - "name": "\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0437 4 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u0438\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 (EZ1, EZ2, EZ3, EZ4)", - "description": "", - "language_code": "uk", - "master": 4 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 9, - "fields": { - "name": "\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0437 \u0434\u0432\u043e\u0445 \u0445\u0432\u0438\u043b\u044c\u043e\u0432\u0438\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 (WZ1, WZ2)", - "description": "\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0437 \u0434\u0432\u043e\u0445 \u0445\u0432\u0438\u043b\u044c\u043e\u0432\u0438\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 (WZ1, WZ2), \u0449\u043e \u0432\u0438\u043c\u0456\u0440\u044e\u044e\u0442\u044c \u0434\u0432\u0456 \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0437\u043c\u0456\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u043d\u0456\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (Bx, By) \u0442\u0430 \u0434\u0432\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0433\u0443\u0441\u0442\u0438\u043d\u0438 \u0437\u043c\u0456\u043d\u043d\u043e\u0433\u043e \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043c\u0443 (Jxz, Jyz)", - "language_code": "uk", - "master": 5 - } -}, -{ - "model": "backend_api.devicetranslation", - "pk": 10, - "fields": { - "name": "Set of 2 Wave probes (WZ1, WZ2)", - "description": "A complex of two wave probes (WZ1, WZ2) measuring two orthogonal variable components of the magnetic field (Bx, By) and two variable components of the current electric density (Jxz, Jyz)", - "language_code": "en", - "master": 5 - } -}, -{ - "model": "backend_api.device", - "pk": 1, - "fields": { - "space_project": 1 - } -}, -{ - "model": "backend_api.device", - "pk": 2, - "fields": { - "space_project": 1 - } -}, -{ - "model": "backend_api.device", - "pk": 3, - "fields": { - "space_project": 1 - } -}, -{ - "model": "backend_api.device", - "pk": 4, - "fields": { - "space_project": 2 - } -}, -{ - "model": "backend_api.device", - "pk": 5, - "fields": { - "space_project": 2 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 1, - "fields": { - "short_name": "V", - "long_name": "Volts", - "language_code": "en", - "master": 1 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 2, - "fields": { - "short_name": "\u0412", - "long_name": "\u0412\u043e\u043b\u044c\u0442\u0438", - "language_code": "uk", - "master": 1 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 3, - "fields": { - "short_name": "V\u22c5m\u22121", - "long_name": "Volts per metre", - "language_code": "en", - "master": 2 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 4, - "fields": { - "short_name": "\u0412\u22c5\u043c\u22121", - "long_name": "\u0412\u043e\u043b\u044c\u0442 \u043d\u0430 \u043c\u0435\u0442\u0440", - "language_code": "uk", - "master": 2 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 5, - "fields": { - "short_name": "nT", - "long_name": "Nanotesla", - "language_code": "en", - "master": 3 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 6, - "fields": { - "short_name": "\u043d\u0422\u043b", - "long_name": "\u041d\u0430\u043d\u043e\u0442\u0435\u0441\u043b\u0430", - "language_code": "uk", - "master": 3 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 7, - "fields": { - "short_name": "A\u22c5cm\u22122", - "long_name": "Amper per square centimetre", - "language_code": "en", - "master": 4 - } -}, -{ - "model": "backend_api.unittranslation", - "pk": 8, - "fields": { - "short_name": "\u0410\u22c5\u0441\u043c\u22122", - "long_name": "\u0410\u043c\u043f\u0435\u0440 \u043d\u0430 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0438\u0439", - "language_code": "uk", - "master": 4 - } -}, -{ - "model": "backend_api.unit", - "pk": 1, - "fields": {} -}, -{ - "model": "backend_api.unit", - "pk": 2, - "fields": {} -}, -{ - "model": "backend_api.unit", - "pk": 3, - "fields": {} -}, -{ - "model": "backend_api.unit", - "pk": 4, - "fields": {} -}, -{ - "model": "backend_api.valuetranslation", - "pk": 1, - "fields": { - "name": "Electric potential", - "description": "Electric field potential", - "language_code": "en", - "master": 1 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 2, - "fields": { - "name": "\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f", - "description": "\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (\u0435\u043b\u0435\u043a\u0442\u0440\u043e\u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b)", - "language_code": "uk", - "master": 1 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 3, - "fields": { - "name": "Electric potential difference", - "description": "", - "language_code": "en", - "master": 2 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 4, - "fields": { - "name": "\u0420\u0456\u0437\u043d\u0438\u0446\u044f \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u0438\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0456\u0432", - "description": "", - "language_code": "uk", - "master": 2 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 5, - "fields": { - "name": "Electric field", - "description": "", - "language_code": "en", - "master": 3 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 6, - "fields": { - "name": "\u0412\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0456 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f", - "description": "", - "language_code": "uk", - "master": 3 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 7, - "fields": { - "name": "Magnetic field", - "description": "", - "language_code": "en", - "master": 4 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 8, - "fields": { - "name": "\u0412\u0435\u043a\u0442\u043e\u0440 \u0456\u043d\u0434\u0443\u043a\u0446\u0456\u0457 \u043c\u0430\u0433\u043d\u0456\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f", - "description": "", - "language_code": "uk", - "master": 4 - } -}, -{ - "model": "backend_api.valuetranslation", - "pk": 9, - "fields": { - "name": "Current density", - "description": "Electric current density", - "language_code": "en", - "master": 5 - } -}, -{ - "model": "backend_api.value", - "pk": 1, - "fields": { - "short_name": "Ve", - "units": 1 - } -}, -{ - "model": "backend_api.value", - "pk": 2, - "fields": { - "short_name": "\u0394Ve", - "units": 1 - } -}, -{ - "model": "backend_api.value", - "pk": 3, - "fields": { - "short_name": "E", - "units": 2 - } -}, -{ - "model": "backend_api.value", - "pk": 4, - "fields": { - "short_name": "B", - "units": 3 - } -}, -{ - "model": "backend_api.value", - "pk": 5, - "fields": { - "short_name": "j", - "units": 4 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 1, - "fields": { - "name": "EZ low-frequency channel", - "description": "Low-frequency channel of the electric potential measurement (1Hz)", - "language_code": "en", - "master": 1 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 2, - "fields": { - "name": "EZ \u043d\u0438\u0437\u044c\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b", - "description": "\u041d\u0438\u0437\u044c\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (1 \u0413\u0446)", - "language_code": "uk", - "master": 1 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 3, - "fields": { - "name": "EZ high-frequency channel", - "description": "High-frequency channel of the electric potential measurement (1kHz)", - "language_code": "en", - "master": 2 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 4, - "fields": { - "name": "EZ \u0432\u0438\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b", - "description": "\u0412\u0438\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (1 \u043a\u0413\u0446)", - "language_code": "uk", - "master": 2 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 5, - "fields": { - "name": "\u0394E1, \u0394E2, \u0394E3", - "description": "\u0394E1 = EZ1 - EZ4 \r\n\u0394E2 = EZ1 - EZ3\r\n\u0394E3 = EZ1 - EZ3", - "language_code": "en", - "master": 3 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 6, - "fields": { - "name": "Bx~, By~ (not calibrated)", - "description": "", - "language_code": "en", - "master": 4 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 7, - "fields": { - "name": "Jxz~, Jyz~ (not calibrated)", - "description": "", - "language_code": "en", - "master": 5 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 8, - "fields": { - "name": "\u0394E1, \u0394E2, \u0394E3", - "description": "\u0394E1 = EZ1 - EZ4 \r\n\u0394E2 = EZ1 - EZ3\r\n\u0394E3 = EZ1 - EZ3", - "language_code": "uk", - "master": 3 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 9, - "fields": { - "name": "Bx~, By~ (\u043d\u0435 \u0442\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0456)", - "description": "", - "language_code": "uk", - "master": 4 - } -}, -{ - "model": "backend_api.channeltranslation", - "pk": 10, - "fields": { - "name": "Jxz~, Jyz~ (\u043d\u0435 \u0442\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0456)", - "description": "", - "language_code": "uk", - "master": 5 - } -}, -{ - "model": "backend_api.channel", - "pk": 1, - "fields": { - "value": 1, - "exponent": -3, - "device": 1, - "klass": [ - "classes.base_data.SingleVarTimeSeries" - ] - } -}, -{ - "model": "backend_api.channel", - "pk": 2, - "fields": { - "value": 1, - "exponent": -3, - "device": 1, - "klass": [ - "classes.base_data.ObliqueThreeVarTimeSeriesHF" - ] - } -}, -{ - "model": "backend_api.channel", - "pk": 3, - "fields": { - "value": 2, - "exponent": 0, - "device": 4, - "klass": [ - "classes.base_data.ObliqueThreeVarTimeSeriesHF" - ] - } -}, -{ - "model": "backend_api.channel", - "pk": 4, - "fields": { - "value": 1, - "exponent": 0, - "device": 5, - "klass": [ - "classes.base_data.OrthogonalTwoVarTimeSeriesHF" - ] - } -}, -{ - "model": "backend_api.channel", - "pk": 5, - "fields": { - "value": 1, - "exponent": 0, - "device": 5, - "klass": [ - "classes.base_data.OrthogonalTwoVarTimeSeriesHF" - ] - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 1, - "fields": { - "name": "V (electric potential LF Fs = 1 Hz)", - "description": "Electric potential measured in low frequency (Fs = 1 Hz)", - "language_code": "en", - "master": 1 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 2, - "fields": { - "name": "V (\u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b LF Fs = 1 \u0413\u0446)", - "description": "\u041d\u0438\u0437\u044c\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0456 \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 (Fs = 1 \u0413\u0446)", - "language_code": "uk", - "master": 1 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 3, - "fields": { - "name": "V (\u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b HF Fs = 1 \u043a\u0413\u0446)", - "description": "\u0412\u0438\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0456 \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 (Fs = 1 \u043a\u0413\u0446)", - "language_code": "uk", - "master": 2 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 4, - "fields": { - "name": "V (electric potential HF Fs = 1 kHz)", - "description": "Electric potential measured in high frequency (Fs = 1 kHz)", - "language_code": "en", - "master": 2 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 5, - "fields": { - "name": "Ex, Ey, Ez (three components of electric field HF Fs = 31.25 kHz)", - "description": "", - "language_code": "en", - "master": 3 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 6, - "fields": { - "name": "Ex, Ey, Ez (\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0443 \u043d\u0430\u043f\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0456 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f HF Fs = 31.25 \u043a\u0413\u0446)", - "description": "", - "language_code": "uk", - "master": 3 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 7, - "fields": { - "name": "Bx, By (two components of magnetic field HF Fs = 31,25 kHz)", - "description": "", - "language_code": "en", - "master": 4 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 8, - "fields": { - "name": "Bx, By (\u0434\u0432\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u043c\u0430\u0433\u043d\u0456\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f HF Fs = 31,25 \u043a\u0413\u0446)", - "description": "", - "language_code": "uk", - "master": 4 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 9, - "fields": { - "name": "Jxz, Jyz (two components of current density Fs = 31.25 kHz)", - "description": "", - "language_code": "en", - "master": 5 - } -}, -{ - "model": "backend_api.parametertranslation", - "pk": 10, - "fields": { - "name": "Jxz, Jyz (\u0434\u0432\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0433\u0443\u0441\u0442\u0438\u043d\u0438 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043c\u0443 Fs = 31.25 \u043a\u0413\u0446)", - "description": "", - "language_code": "uk", - "master": 5 - } -}, -{ - "model": "backend_api.parameter", - "pk": 1, - "fields": { - "value": 1, - "exponent": -3, - "channel": 1, - "klass": [ - "classes.base_data.SingleVarTimeSeries" - ] - } -}, -{ - "model": "backend_api.parameter", - "pk": 2, - "fields": { - "value": 1, - "exponent": -3, - "channel": 2, - "klass": [ - "classes.base_data.SingleVarTimeSeries" - ] - } -}, -{ - "model": "backend_api.parameter", - "pk": 3, - "fields": { - "value": 3, - "exponent": 0, - "channel": 3, - "klass": [ - "classes.base_data.OrthogonalThreeVarTimeSeriesHF" - ] - } -}, -{ - "model": "backend_api.parameter", - "pk": 4, - "fields": { - "value": 4, - "exponent": 0, - "channel": 4, - "klass": [ - "classes.base_data.OrthogonalTwoVarTimeSeriesHF" - ] - } -}, -{ - "model": "backend_api.parameter", - "pk": 5, - "fields": { - "value": 5, - "exponent": 0, - "channel": 5, - "klass": [ - "classes.base_data.OrthogonalTwoVarTimeSeriesHF" - ] - } -} -] +[ +{ + "model": "backend_api.space_projecttranslation", + "pk": 1, + "fields": { + "name": "Potential", + "description": "The space scientific experiment \"Potential\" on the ionosphere aboard the Ukrainian Sich-2 microsatellite (2011-2012)", + "language_code": "en", + "master": 1 + } +}, +{ + "model": "backend_api.space_projecttranslation", + "pk": 2, + "fields": { + "name": "\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b", + "description": "\u041d\u0430\u0443\u043a\u043e\u0432\u0438\u0439 \u0456\u043e\u043d\u043e\u0441\u0444\u0435\u0440\u043d\u0438\u0439 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u0438\u0439 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \"\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\" \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u043e\u0433\u043e \u043c\u0456\u043a\u0440\u043e\u0441\u0443\u043f\u0443\u0442\u043d\u0438\u043a\u0430 \"\u0421\u0456\u0447-2\" (2011-2012)", + "language_code": "uk", + "master": 1 + } +}, +{ + "model": "backend_api.space_projecttranslation", + "pk": 3, + "fields": { + "name": "Variant", + "description": "The space scientific experiment \"Variant\" on the ionosphere aboard the Ukrainian Sich-1M satellite (2004-2005)", + "language_code": "en", + "master": 2 + } +}, +{ + "model": "backend_api.space_projecttranslation", + "pk": 4, + "fields": { + "name": "\u0412\u0430\u0440\u0456\u0430\u043d\u0442", + "description": "\u041d\u0430\u0443\u043a\u043e\u0432\u0438\u0439 \u0456\u043e\u043d\u043e\u0441\u0444\u0435\u0440\u043d\u0438\u0439 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u0438\u0439 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \"\u0412\u0430\u0440\u0456\u0430\u043d\u0442\" \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u043e\u0433\u043e \u0441\u0443\u043f\u0443\u0442\u043d\u0438\u043a\u0430 \"\u0421\u0456\u0447-1\u041c\" (2004-2005)", + "language_code": "uk", + "master": 2 + } +}, +{ + "model": "backend_api.space_project", + "pk": 1, + "fields": { + "klass": [ + "classes.potential.Potential" + ], + "date_start": "2011-08-30", + "date_end": "2012-11-01" + } +}, +{ + "model": "backend_api.space_project", + "pk": 2, + "fields": { + "klass": [ + "classes.variant.Variant" + ], + "date_start": "2005-02-01", + "date_end": "2005-03-26" + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 1, + "fields": { + "name": "Electric probe (EP)", + "description": "Electric probes are intended for the measurement of electric field intensity in space plasma with the help of two similar probes placed at a known distance. Potential project used a single probe setup that can be used to measure the spacecraft's own electric potential.", + "language_code": "en", + "master": 1 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 2, + "fields": { + "name": "\u0415\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u0438\u0439 \u0437\u043e\u043d\u0434 (EP)", + "description": "\u0414\u0430\u0432\u0430\u0447 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u043d\u0430\u043f\u0440\u0443\u0436\u0435\u043d\u043e\u0441\u0442\u0456 \u0437\u043c\u0456\u043d\u043d\u043e\u0433\u043e \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0443 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u0456\u0439 \u043f\u043b\u0430\u0437\u043c\u0456 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0434\u0432\u043e\u0445 \u043f\u043e\u0434\u0456\u0431\u043d\u0438\u0445 \u0434\u0430\u0432\u0430\u0447\u0456\u0432, \u0440\u043e\u0437\u043d\u0435\u0441\u0435\u043d\u0438\u0445 \u043d\u0430 \u0432\u0456\u0434\u043e\u043c\u0443 \u0432\u0456\u0434\u0441\u0442\u0430\u043d\u044c. \u0410\u043b\u0435 \u0432 \u043a\u043e\u0441\u043c\u0456\u0447\u043d\u043e\u043c\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0456 \u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b \u0432\u0456\u043d \u0431\u0443\u0432 \u043e\u0434\u0438\u043d :(", + "language_code": "uk", + "master": 1 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 3, + "fields": { + "name": "Neutral gase parameters sensor (NCP)", + "description": "A system of two pressure probes using an inverse-magnetron converter as a sensor. (The device to produce the i/v characteristics from which the ITM team is to obtain the neutral gas density and pressure.)", + "language_code": "en", + "master": 2 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 4, + "fields": { + "name": "\u0414\u0430\u0442\u0447\u0438\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0430\u0437\u0443 \u041d\u041a\u041f", + "description": "\u041d\u041a\u041f \u0441\u043a\u043b\u0430\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u0434\u0432\u043e\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 \u0442\u0438\u0441\u043a\u0443 \u0437 \u0456\u043d\u0432\u0435\u0440\u0441\u043d\u043e-\u043c\u0430\u0433\u043d\u0435\u0442\u0440\u043e\u043d\u043d\u0438\u043c \u043f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0447\u0435\u043c \u0432 \u044f\u043a\u043e\u0441\u0442\u0456 \u0447\u0443\u0442\u043b\u0438\u0432\u043e\u0433\u043e \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443", + "language_code": "uk", + "master": 2 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 5, + "fields": { + "name": "Plasma parameters sensor (ECP)", + "description": "A single cylindrical Langmiur probe measuring 0.05 cm in radius with 12 cm in length along with a protective electrode measuring 0.2 cm in radius and 12.5 cm in length. (The device to produce the i/v characteristics from which the ITM team is to obtain the plasma density and the electron temperature)", + "language_code": "en", + "master": 3 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 6, + "fields": { + "name": "\u0414\u0430\u0442\u0447\u0438\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u043f\u043b\u0430\u0437\u043c\u0438 (\u0415\u041a\u041f)", + "description": "\u041e\u0434\u0438\u043d\u0438\u0447\u043d\u0438\u0439 \u0446\u0438\u043b\u0456\u043d\u0434\u0440\u0438\u0447\u043d\u0438\u0439 \u0437\u043e\u043d\u0434 \u041b\u0435\u043d\u0433\u043c\u044e\u0440\u0430 \u0440\u0430\u0434\u0456\u0443\u043e\u043c 0,05 \u0441\u043c \u0456 \u0434\u043e\u0432\u0436\u0438\u043d\u043e\u044e 12 \u0441\u043c \u0437 \u043e\u0445\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u0434\u043e\u043c \u0440\u0430\u0434\u0456\u0443\u0441\u043e\u043c 0,2 \u0441\u043c \u0434\u043e\u0432\u0436\u0438\u043d\u043e\u044e 12,5 \u0441\u043c", + "language_code": "uk", + "master": 3 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 7, + "fields": { + "name": "Set of 4 Electric probes (EZ1, EZ2, EZ3, EZ4)", + "description": "", + "language_code": "en", + "master": 4 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 8, + "fields": { + "name": "\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0437 4 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u0438\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 (EZ1, EZ2, EZ3, EZ4)", + "description": "", + "language_code": "uk", + "master": 4 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 9, + "fields": { + "name": "\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0437 \u0434\u0432\u043e\u0445 \u0445\u0432\u0438\u043b\u044c\u043e\u0432\u0438\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 (WZ1, WZ2)", + "description": "\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0437 \u0434\u0432\u043e\u0445 \u0445\u0432\u0438\u043b\u044c\u043e\u0432\u0438\u0445 \u0437\u043e\u043d\u0434\u0456\u0432 (WZ1, WZ2), \u0449\u043e \u0432\u0438\u043c\u0456\u0440\u044e\u044e\u0442\u044c \u0434\u0432\u0456 \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0437\u043c\u0456\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u043d\u0456\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (Bx, By) \u0442\u0430 \u0434\u0432\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0433\u0443\u0441\u0442\u0438\u043d\u0438 \u0437\u043c\u0456\u043d\u043d\u043e\u0433\u043e \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043c\u0443 (Jxz, Jyz)", + "language_code": "uk", + "master": 5 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 10, + "fields": { + "name": "Set of 2 Wave probes (WZ1, WZ2)", + "description": "A complex of two wave probes (WZ1, WZ2) measuring two orthogonal variable components of the magnetic field (Bx, By) and two variable components of the current electric density (Jxz, Jyz)", + "language_code": "en", + "master": 5 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 11, + "fields": { + "name": "Faraday cups (FC1, FC2)", + "description": "", + "language_code": "en", + "master": 6 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 12, + "fields": { + "name": "Rogowski coil", + "description": "", + "language_code": "en", + "master": 7 + } +}, +{ + "model": "backend_api.devicetranslation", + "pk": 13, + "fields": { + "name": "Fluxgate magnetometer FZM", + "description": "", + "language_code": "en", + "master": 8 + } +}, +{ + "model": "backend_api.device", + "pk": 1, + "fields": { + "space_project": 1 + } +}, +{ + "model": "backend_api.device", + "pk": 2, + "fields": { + "space_project": 1 + } +}, +{ + "model": "backend_api.device", + "pk": 3, + "fields": { + "space_project": 1 + } +}, +{ + "model": "backend_api.device", + "pk": 4, + "fields": { + "space_project": 2 + } +}, +{ + "model": "backend_api.device", + "pk": 5, + "fields": { + "space_project": 2 + } +}, +{ + "model": "backend_api.device", + "pk": 6, + "fields": { + "space_project": 2 + } +}, +{ + "model": "backend_api.device", + "pk": 7, + "fields": { + "space_project": 2 + } +}, +{ + "model": "backend_api.device", + "pk": 8, + "fields": { + "space_project": 2 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 1, + "fields": { + "short_name": "V", + "long_name": "Volts", + "language_code": "en", + "master": 1 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 2, + "fields": { + "short_name": "\u0412", + "long_name": "\u0412\u043e\u043b\u044c\u0442\u0438", + "language_code": "uk", + "master": 1 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 3, + "fields": { + "short_name": "V\u22c5m\u22121", + "long_name": "Volts per metre", + "language_code": "en", + "master": 2 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 4, + "fields": { + "short_name": "\u0412\u22c5\u043c\u22121", + "long_name": "\u0412\u043e\u043b\u044c\u0442 \u043d\u0430 \u043c\u0435\u0442\u0440", + "language_code": "uk", + "master": 2 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 5, + "fields": { + "short_name": "nT", + "long_name": "Nanotesla", + "language_code": "en", + "master": 3 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 6, + "fields": { + "short_name": "\u043d\u0422\u043b", + "long_name": "\u041d\u0430\u043d\u043e\u0442\u0435\u0441\u043b\u0430", + "language_code": "uk", + "master": 3 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 7, + "fields": { + "short_name": "A\u22c5cm\u22122", + "long_name": "Amper per square centimetre", + "language_code": "en", + "master": 4 + } +}, +{ + "model": "backend_api.unittranslation", + "pk": 8, + "fields": { + "short_name": "\u0410\u22c5\u0441\u043c\u22122", + "long_name": "\u0410\u043c\u043f\u0435\u0440 \u043d\u0430 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0438\u0439", + "language_code": "uk", + "master": 4 + } +}, +{ + "model": "backend_api.unit", + "pk": 1, + "fields": {} +}, +{ + "model": "backend_api.unit", + "pk": 2, + "fields": {} +}, +{ + "model": "backend_api.unit", + "pk": 3, + "fields": {} +}, +{ + "model": "backend_api.unit", + "pk": 4, + "fields": {} +}, +{ + "model": "backend_api.valuetranslation", + "pk": 1, + "fields": { + "name": "Electric potential", + "description": "Electric field potential", + "language_code": "en", + "master": 1 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 2, + "fields": { + "name": "\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f", + "description": "\u041f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (\u0435\u043b\u0435\u043a\u0442\u0440\u043e\u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b)", + "language_code": "uk", + "master": 1 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 3, + "fields": { + "name": "Electric potential difference", + "description": "", + "language_code": "en", + "master": 2 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 4, + "fields": { + "name": "\u0420\u0456\u0437\u043d\u0438\u0446\u044f \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u0438\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0456\u0432", + "description": "", + "language_code": "uk", + "master": 2 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 5, + "fields": { + "name": "Electric field", + "description": "", + "language_code": "en", + "master": 3 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 6, + "fields": { + "name": "\u0412\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0456 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f", + "description": "", + "language_code": "uk", + "master": 3 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 7, + "fields": { + "name": "Magnetic field", + "description": "", + "language_code": "en", + "master": 4 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 8, + "fields": { + "name": "\u0412\u0435\u043a\u0442\u043e\u0440 \u0456\u043d\u0434\u0443\u043a\u0446\u0456\u0457 \u043c\u0430\u0433\u043d\u0456\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f", + "description": "", + "language_code": "uk", + "master": 4 + } +}, +{ + "model": "backend_api.valuetranslation", + "pk": 9, + "fields": { + "name": "Current density", + "description": "Electric current density", + "language_code": "en", + "master": 5 + } +}, +{ + "model": "backend_api.value", + "pk": 1, + "fields": { + "short_name": "Ve", + "units": 1 + } +}, +{ + "model": "backend_api.value", + "pk": 2, + "fields": { + "short_name": "\u0394Ve", + "units": 1 + } +}, +{ + "model": "backend_api.value", + "pk": 3, + "fields": { + "short_name": "E", + "units": 2 + } +}, +{ + "model": "backend_api.value", + "pk": 4, + "fields": { + "short_name": "B", + "units": 3 + } +}, +{ + "model": "backend_api.value", + "pk": 5, + "fields": { + "short_name": "j", + "units": 4 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 1, + "fields": { + "name": "EZ low-frequency channel", + "description": "Low-frequency channel of the electric potential measurement (1Hz)", + "language_code": "en", + "master": 1 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 2, + "fields": { + "name": "EZ \u043d\u0438\u0437\u044c\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b", + "description": "\u041d\u0438\u0437\u044c\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (1 \u0413\u0446)", + "language_code": "uk", + "master": 1 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 3, + "fields": { + "name": "EZ high-frequency channel", + "description": "High-frequency channel of the electric potential measurement (1kHz)", + "language_code": "en", + "master": 2 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 4, + "fields": { + "name": "EZ \u0432\u0438\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b", + "description": "\u0412\u0438\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f (1 \u043a\u0413\u0446)", + "language_code": "uk", + "master": 2 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 5, + "fields": { + "name": "\u0394E1, \u0394E2, \u0394E3", + "description": "\u0394E1 = EZ1 - EZ4 \r\n\u0394E2 = EZ1 - EZ3\r\n\u0394E3 = EZ1 - EZ3", + "language_code": "en", + "master": 3 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 6, + "fields": { + "name": "Bx~, By~ (not calibrated)", + "description": "", + "language_code": "en", + "master": 4 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 7, + "fields": { + "name": "Jxz~, Jyz~ (not calibrated)", + "description": "", + "language_code": "en", + "master": 5 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 8, + "fields": { + "name": "\u0394E1, \u0394E2, \u0394E3", + "description": "\u0394E1 = EZ1 - EZ4 \r\n\u0394E2 = EZ1 - EZ3\r\n\u0394E3 = EZ1 - EZ3", + "language_code": "uk", + "master": 3 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 9, + "fields": { + "name": "Bx~, By~ (\u043d\u0435 \u0442\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0456)", + "description": "", + "language_code": "uk", + "master": 4 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 10, + "fields": { + "name": "Jxz~, Jyz~ (\u043d\u0435 \u0442\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0456)", + "description": "", + "language_code": "uk", + "master": 5 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 11, + "fields": { + "name": "\u0394E1=, \u0394E2=, \u0394E3=", + "description": "", + "language_code": "en", + "master": 6 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 12, + "fields": { + "name": "FC1~, FC2~", + "description": "", + "language_code": "en", + "master": 7 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 13, + "fields": { + "name": "JF~", + "description": "", + "language_code": "en", + "master": 8 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 14, + "fields": { + "name": "Bx, By, Bz", + "description": "", + "language_code": "en", + "master": 9 + } +}, +{ + "model": "backend_api.channeltranslation", + "pk": 15, + "fields": { + "name": "FC1=, FC2=", + "description": "", + "language_code": "en", + "master": 10 + } +}, +{ + "model": "backend_api.channel", + "pk": 1, + "fields": { + "value": 1, + "exponent": -3, + "device": 1, + "klass": [ + "classes.base_data.SingleVarTimeSeries" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 2, + "fields": { + "value": 1, + "exponent": -3, + "device": 1, + "klass": [ + "classes.base_data.SingleVarTimeSeries" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 3, + "fields": { + "value": 2, + "exponent": 0, + "device": 4, + "klass": [ + "classes.base_data.ObliqueThreeVarTimeSeriesHF" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 4, + "fields": { + "value": 1, + "exponent": 0, + "device": 5, + "klass": [ + "classes.base_data.OrthogonalTwoVarTimeSeriesHF" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 5, + "fields": { + "value": 1, + "exponent": 0, + "device": 5, + "klass": [ + "classes.base_data.OrthogonalTwoVarTimeSeriesHF" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 6, + "fields": { + "value": 2, + "exponent": 0, + "device": 4, + "klass": [ + "classes.base_data.ObliqueThreeVarTimeSeriesLF" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 7, + "fields": { + "value": 5, + "exponent": 0, + "device": 6, + "klass": [ + "classes.base_data.ScalarValueDifference" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 8, + "fields": { + "value": 5, + "exponent": 0, + "device": 7, + "klass": [ + "classes.base_data.SingleVarTimeSeries" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 9, + "fields": { + "value": 4, + "exponent": 0, + "device": 8, + "klass": [ + "classes.base_data.OrthogonalThreeVarTimeSeriesLF" + ] + } +}, +{ + "model": "backend_api.channel", + "pk": 10, + "fields": { + "value": 5, + "exponent": 0, + "device": 6, + "klass": [ + "classes.base_data.ScalarValueDifference" + ] + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 1, + "fields": { + "name": "V (electric potential LF Fs = 1 Hz)", + "description": "Electric potential measured in low frequency (Fs = 1 Hz)", + "language_code": "en", + "master": 1 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 2, + "fields": { + "name": "V (\u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b LF Fs = 1 \u0413\u0446)", + "description": "\u041d\u0438\u0437\u044c\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0456 \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 (Fs = 1 \u0413\u0446)", + "language_code": "uk", + "master": 1 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 3, + "fields": { + "name": "V (\u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b HF Fs = 1 \u043a\u0413\u0446)", + "description": "\u0412\u0438\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0456 \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f \u0435\u043b\u0435\u043a\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0456\u0430\u043b\u0443 (Fs = 1 \u043a\u0413\u0446)", + "language_code": "uk", + "master": 2 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 4, + "fields": { + "name": "V (electric potential HF Fs = 1 kHz)", + "description": "Electric potential measured in high frequency (Fs = 1 kHz)", + "language_code": "en", + "master": 2 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 5, + "fields": { + "name": "Ex, Ey, Ez (three components of electric field HF)", + "description": "", + "language_code": "en", + "master": 3 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 6, + "fields": { + "name": "Ex, Ey, Ez (\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0443 \u043d\u0430\u043f\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0456 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f HF Fs = 31.25 \u043a\u0413\u0446)", + "description": "", + "language_code": "uk", + "master": 3 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 7, + "fields": { + "name": "Bx, By (two components of magnetic field HF)", + "description": "", + "language_code": "en", + "master": 4 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 8, + "fields": { + "name": "Bx, By (\u0434\u0432\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u043c\u0430\u0433\u043d\u0456\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f HF Fs = 31,25 \u043a\u0413\u0446)", + "description": "", + "language_code": "uk", + "master": 4 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 9, + "fields": { + "name": "Jxz, Jyz (two components of current density)", + "description": "", + "language_code": "en", + "master": 5 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 10, + "fields": { + "name": "Jxz, Jyz (\u0434\u0432\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0433\u0443\u0441\u0442\u0438\u043d\u0438 \u0435\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043c\u0443 Fs = 31.25 \u043a\u0413\u0446)", + "description": "", + "language_code": "uk", + "master": 5 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 11, + "fields": { + "name": "E1=, E2=, E3= (three components of electric field LF)", + "description": "", + "language_code": "en", + "master": 6 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 12, + "fields": { + "name": "\u0394FC~", + "description": "", + "language_code": "en", + "master": 7 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 13, + "fields": { + "name": "JF~ (current density)", + "description": "", + "language_code": "en", + "master": 8 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 14, + "fields": { + "name": "Bx, By, Bz (three components of magnetic field)", + "description": "", + "language_code": "en", + "master": 9 + } +}, +{ + "model": "backend_api.parametertranslation", + "pk": 15, + "fields": { + "name": "\u0394FC=", + "description": "", + "language_code": "en", + "master": 10 + } +}, +{ + "model": "backend_api.parameter", + "pk": 1, + "fields": { + "value": 1, + "exponent": -3, + "channel": 1, + "klass": [ + "classes.base_data.SingleVarTimeSeries" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 2, + "fields": { + "value": 1, + "exponent": -3, + "channel": 2, + "klass": [ + "classes.base_data.SingleVarTimeSeries" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 3, + "fields": { + "value": 3, + "exponent": 0, + "channel": 3, + "klass": [ + "classes.base_data.ObliqueThreeVarTimeSeriesHF" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 4, + "fields": { + "value": 4, + "exponent": 0, + "channel": 4, + "klass": [ + "classes.base_data.OrthogonalTwoVarTimeSeriesHF" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 5, + "fields": { + "value": 5, + "exponent": 0, + "channel": 5, + "klass": [ + "classes.base_data.OrthogonalTwoVarTimeSeriesHF" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 6, + "fields": { + "value": 2, + "exponent": 0, + "channel": 6, + "klass": [ + "classes.base_data.ObliqueThreeVarTimeSeriesLF" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 7, + "fields": { + "value": 5, + "exponent": 0, + "channel": 7, + "klass": [ + "classes.base_data.ScalarValueDifference" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 8, + "fields": { + "value": 5, + "exponent": 0, + "channel": 8, + "klass": [ + "classes.base_data.SingleVarTimeSeries" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 9, + "fields": { + "value": 4, + "exponent": 0, + "channel": 9, + "klass": [ + "classes.base_data.OrthogonalThreeVarTimeSeriesLF" + ] + } +}, +{ + "model": "backend_api.parameter", + "pk": 10, + "fields": { + "value": 5, + "exponent": 0, + "channel": 10, + "klass": [ + "classes.base_data.ScalarValueDifference" + ] + } +} +] diff --git a/backend/promis/backend_api/models.py b/backend/promis/backend_api/models.py index ae92492..ca09e30 100644 --- a/backend/promis/backend_api/models.py +++ b/backend/promis/backend_api/models.py @@ -3,6 +3,7 @@ from django.db import models from django.db.models.fields import ( DateTimeField, IntegerField, CharField, DateField, FloatField, TextField ) +from django.contrib.postgres.fields import ArrayField from django.db.models.fields.related import ForeignKey from jsonfield import JSONField from django.contrib.gis.db.models import LineStringField @@ -92,6 +93,9 @@ class Session(models.Model): # but ensures distances and intersections are caclulated correctly # TODO: srid should eventually be 4979 see #222 geo_line = LineStringField(dim = 3, srid = 4326, geography=True) + + # TODO: 4D coordinates, see #256 + altitude = ArrayField(FloatField()) space_project = ForeignKey('Space_project', null = True) class Meta: diff --git a/backend/promis/backend_api/serializer.py b/backend/promis/backend_api/serializer.py index c193dee..cfbc616 100644 --- a/backend/promis/backend_api/serializer.py +++ b/backend/promis/backend_api/serializer.py @@ -83,7 +83,9 @@ def get_geo_line(self, obj): #return obj.geo_line.wkb.hex() # TODO: study whether pre-building the list or JSON would speed up things - return parsers.wkb(obj.geo_line.wkb) # <- Generator + # TODO: ugly hack before #256 + # geo_line.wkb calls a generator implicitly + return ( (*geo[:2], alt) for alt, geo in zip(obj.altitude, parsers.wkb(obj.geo_line.wkb)) ) def get_timelapse(self, obj): # TODO: change to time_start in model for consistency diff --git a/backend/promis/classes/base_data.py b/backend/promis/classes/base_data.py index ba62ac2..bd38aeb 100644 --- a/backend/promis/classes/base_data.py +++ b/backend/promis/classes/base_data.py @@ -41,6 +41,15 @@ def data_start(self): def frequency(self): return self.measurement.sampling_frequency + def __len__(self): + return len(self.doc) + + def __getitem__(self, idx): + return self.doc[idx] + + def data(self, selection = slice(None)): + return self.doc[selection] + def timeslice(self, start, end): ''' Returns a slice for accessing data between start and end inclusively. @@ -77,14 +86,6 @@ class SingleVarTimeSeries(BaseData): # Underlying document is a simple list # delegate sequence protocol there - def __len__(self): - return len(self.doc) - - def __getitem__(self, idx): - return self.doc[idx] - - def data(self, selection = slice(None)): - return self.doc[selection] # TODO: propagate upwards? def quicklook(self, points, selection = slice(None)): @@ -134,26 +135,58 @@ def avg_float(l, n, span): yield avg_float(v, int(span * i), span) -# TODO: realize class ObliqueThreeVarTimeSeriesHF(BaseData): """ [en]: Three high frequency components in oblique coordinate system [uk]: Три високочастотні компоненти вектора величини в косоугольній системі координат """ + def quicklook(self, points, selection = slice(None)): + return - -# TODO: realize class OrthogonalThreeVarTimeSeriesHF(BaseData): """ [en]: Three high frequency components in orthogonal coordinate system [uk]: Три високочастотні компоненти вектора величини в ортогональній системі координат """ + def quicklook(self, points, selection = slice(None)): + return +class ObliqueThreeVarTimeSeriesLF(BaseData): + """ + [en]: Three low frequency components in oblique coordinate system + [uk]: Три низькочастотні компоненти вектора величини в косоугольній системі координат + """ + def quicklook(self, points, selection = slice(None)): + return + +class OrthogonalThreeVarTimeSeriesLF(BaseData): + """ + [en]: Three low frequency components in orthogonal coordinate system + [uk]: Три низькочастотні компоненти вектора величини в ортогональній системі координат + """ + def quicklook(self, points, selection = slice(None)): + return -# TODO: realize class OrthogonalTwoVarTimeSeriesHF(BaseData): """ [en]: Two high frequency components in orthogonal coordinate system [uk]: Дві високочастотні компоненти вектора величини в ортогональній системі координат """ - pass + def quicklook(self, points, selection = slice(None)): + return + +class ObliqueTwoVarTimeSeriesHF(BaseData): + """ + [en]: Two high frequency components in oblique coordinate system + [uk]: Дві високочастотні компоненти вектора величини в косоугольній системі координат + """ + def quicklook(self, points, selection = slice(None)): + return + +class ScalarValueDifference(BaseData): + """ + [en]: Scalar difference of two values + [uk]: Скалярна різниця двух змінних + """ + def quicklook(self, points, selection = slice(None)): + return diff --git a/backend/promis/classes/potential.py b/backend/promis/classes/potential.py index 921e454..e1b09e0 100644 --- a/backend/promis/classes/potential.py +++ b/backend/promis/classes/potential.py @@ -132,7 +132,10 @@ def fetch(self, daydir): ez_time_end = time_end # Generator for the orbit - line_gen = ( (y.lon, y.lat, t) for t, y, _ in orbit.generate_orbit(orbit_path, time_start, time_end) ) + # TODO: rewrite as generator if possible at all + path = [ (y.lon, y.lat, y.alt, t) for t, y, _ in orbit.generate_orbit(orbit_path, time_start, time_end) ] + line_gen = [ (x, y, t) for x, y, _, t in path ] + alt_gen = [ alt for _, _, alt, _ in path ] # Converting time to python objects for convenience # This is the point where onboard time gets converted to the UTC time_start = unix_time.maketime(time_start) @@ -143,7 +146,8 @@ def fetch(self, daydir): # Creating a session object # TODO: make it more readable # TODO: srid should be 4979 see #222 - ez_sess_obj = model.Session.objects.create(time_begin = time_start, time_end = time_end, geo_line = LineString(*line_gen, srid = 4326), space_project = self.project_obj ) + ez_sess_obj = model.Session.objects.create(time_begin = time_start, time_end = time_end, altitude = alt_gen, + geo_line = LineString(*line_gen, srid = 4326), space_project = self.project_obj ) # TODO: record data_id in the object # TODO: somehow generalise this process maybe diff --git a/backend/promis/classes/variant.py b/backend/promis/classes/variant.py index 9740ce4..a25876e 100644 --- a/backend/promis/classes/variant.py +++ b/backend/promis/classes/variant.py @@ -19,12 +19,51 @@ # permissions and limitations under the Licence. # - +from django.contrib.gis.geos import LineString from classes.base_project import BaseProject +import datetime +import ftp_helper, parsers, unix_time, orbit +import backend_api.models as model -# TODO: implement obtaining of Variant data - +sessions_time = { + "597": { + 'time_start': datetime.datetime(2005, 2, 1, 8, 22, 59).timestamp(), + 'time_end': datetime.datetime(2005, 2, 1, 8, 43, 29).timestamp() + }, + "1056": { + 'time_start': datetime.datetime(2005, 3, 2, 17, 23, 10).timestamp(), + 'time_end': datetime.datetime(2005, 3, 2, 17, 27, 37).timestamp() + }, + "1057": { + 'time_start': datetime.datetime(2005, 3, 3, 5, 42, 57).timestamp(), + 'time_end': datetime.datetime(2005, 3, 3, 5, 44, 37).timestamp() + }, + "1071": { + 'time_start': datetime.datetime(2005, 3, 3, 16, 48, 14).timestamp(), + 'time_end': datetime.datetime(2005, 3, 3, 16, 52, 41).timestamp() + }, + "1109": { + 'time_start': datetime.datetime(2005, 3, 6, 11, 3, 13).timestamp(), + 'time_end': datetime.datetime(2005, 3, 6, 11, 7, 40).timestamp() + }, + "1139": { + 'time_start': datetime.datetime(2005, 3, 8, 1, 53, 5).timestamp(), + 'time_end': datetime.datetime(2005, 3, 8, 1, 57, 32).timestamp() + }, + "1278": { + 'time_start': datetime.datetime(2005, 3, 17, 13, 52, 49).timestamp(), + 'time_end': datetime.datetime(2005, 3, 17, 13, 57, 16).timestamp() + }, + "1363": { + 'time_start': datetime.datetime(2005, 3, 23, 1, 13, 6).timestamp(), + 'time_end': datetime.datetime(2005, 3, 23, 1, 14, 2).timestamp() + }, + "1394": { + 'time_start': datetime.datetime(2005, 3, 25, 1, 32, 47).timestamp(), + 'time_end': datetime.datetime(2005, 3, 25, 1, 33, 43).timestamp() + } +} class Variant(BaseProject): ''' @@ -33,4 +72,141 @@ class Variant(BaseProject): ''' def check(*args, **kwargs): - return [] + exceptions = {"1363", # too few anchor points unfortunately + "Read_me.doc", + "Tabl_2.doc", + "Tabl_3.doc"} + with ftp_helper.FTPChecker("Variant/Data_Release1/", "ftp.promis.ikd.kiev.ua") as ftp: + ftp.exceptions = exceptions + # TODO: check that directory exists properly + # TODO: any more elegant way? re-yield or smth + for v in ftp.check(): + yield v + + def fetch(self, daydir): + with ftp_helper.FTPChecker("Variant/", "ftp.promis.ikd.kiev.ua") as ftp: + ftp.cwd("telemetry") + # TODO: timezone hack + Δ = 1111714367 - 1111703568 + + with ftp.xopen("var{0}.tm".format(daydir)) as fp: + orbit_path = { (t + Δ): pt for t, pt in parsers.telemetry(fp, cartesian=False) } + + time_start = int(sessions_time[daydir]['time_start']) + time_end = int(sessions_time[daydir]['time_end']) + + path = [ (y.lon, y.lat, y.alt, t) for t, y, _ in orbit.generate_orbit(orbit_path, time_start, time_end, time_delta = 20) ] + line_gen = [ (x, y, t) for x, y, _, t in path ] + alt_gen = [ alt for _, _, alt, _ in path ] + + time_start = unix_time.maketime(time_start) + time_end = unix_time.maketime(time_end) + time_dur = time_end - time_start + print("\tSession: [ %s, %s ] (%s)." % (time_start.isoformat(), time_end.isoformat(), str(time_dur)) ) + + sess_obj = model.Session.objects.create(time_begin = time_start, time_end = time_end, altitude = alt_gen, + geo_line = LineString(*line_gen, srid = 4326), space_project = self.project_obj ) + + # read per-channel sampling frequencies + component_sf = [['Bx', 0], ['By',0], ['Bz',0], ['Ts',0], ['Te',0], + ['JF~',0], + ['FC1~',0], ['FC1=',0], ['FC2~',0], ['FC2=',0], + ['Jyz~',0], ['Bx~',0], ['Jxz~',0], ['By~',0], + ['E1~',0], ['E1=',0], ['E2~',0], ['E2=',0], ['E3~',0], ['E3=',0]] + ftp.cwd("..") + ftp.cwd("Data_Release1/{0}".format(daydir)) + + with ftp.xopen("{0}.txt".format(daydir)) as fp: + for line in fp: + if line.rstrip() == "Sampling frequency, Hz": + break + idx = 0 + for line in fp: + if idx >= len(component_sf): + break + if daydir in ["1057", "1071", "1109", "1278", "1394"] and idx == 3: + idx += 2 + if len(line.rstrip()) != 0: + component_sf[idx][1] = float(line) + idx += 1 + + # Per-channel dicts of filename and JSON name + data = { + 'ΔE1, ΔE2, ΔE3': { + 'param': 'Ex, Ey, Ez (three components of electric field HF)', + 'comps' : ['E1~', 'E2~', 'E3~'] + }, + 'Bx~, By~ (not calibrated)': { + 'param': 'Bx, By (two components of magnetic field HF)', + 'comps' : ['Bx~', 'By~'] + }, + 'Jxz~, Jyz~ (not calibrated)': { + 'param': 'Jxz, Jyz (two components of current density)', + 'comps' : ['Jxz~', 'Jyz~'] + }, + 'ΔE1=, ΔE2=, ΔE3=': { + 'param': 'E1=, E2=, E3= (three components of electric field LF)', + 'comps': ['E1=', 'E2=', 'E3='] + }, + 'FC1~, FC2~': { + 'param': 'ΔFC~', + 'comps': ['FC1~', 'FC2~'] + }, + 'JF~': { + 'param': 'JF~ (current density)', + 'comps': ['JF~'] + }, + 'Bx, By, Bz': { + 'param': 'Bx, By, Bz (three components of magnetic field)', + 'comps': ['Bx', 'By', 'Bz'] + }, + 'FC1=, FC2=': { + 'param': 'ΔFC=', + 'comps': ['FC1=', 'FC2='] + } + } + + def get_file(name): + try: + with ftp.xopen(name) as fp: + return [ float(ln) for ln in fp ] + except: + return [] + + for chan_name, chan_files in data.items(): + chan_obj = model.Channel.objects.language('en').filter(name = chan_name)[0] + par_obj = model.Parameter.objects.language('en').filter(name = chan_files['param'])[0] + list_of_components = [get_file(name) for name in chan_files['comps']] + + if (len(list_of_components) == 0) or (sum(len(x) for x in list_of_components) == 0): + continue + + # All the components of the single channel are suuposed to have the same sampling frequecny + # In fact sometimes some fo them appeared to be 0, that is why max is needed here + def find_sf(components): + max_sf = 0 + for comp_name in components: + for name, sf in component_sf: + if name == comp_name: + max_sf = max(max_sf, sf) + break + #print("components: " + str(components) + " max_sf: " + str(max_sf)) + return max_sf + + sampling_frequency = find_sf(chan_files['comps']) + numValues = int(time_dur.total_seconds() * sampling_frequency) + + def catch_idx_error(component, idx): + try: + return component[idx] + except IndexError: + return 0.0 + + # We should better not covert a single component into a tuple. Handling this here + if len(list_of_components) > 1: + json_data = [tuple([catch_idx_error(component,idx) for component in list_of_components]) for idx in range(numValues)] + else: + json_data = [catch_idx_error(list_of_components[0],idx) for idx in range(numValues)] + + doc_obj = model.Document.objects.create(json_data = json_data ) + meas = model.Measurement.objects.create(session = sess_obj, parameter = par_obj, channel = chan_obj, channel_doc = doc_obj, parameter_doc = doc_obj, sampling_frequency = sampling_frequency, max_frequency = sampling_frequency, min_frequency = sampling_frequency) diff --git a/backend/promis/export.py b/backend/promis/export.py index 2ee5ae1..d5f66d7 100644 --- a/backend/promis/export.py +++ b/backend/promis/export.py @@ -23,6 +23,7 @@ import collections import math import unix_time +import itertools # TODO: currently only one data row # TODO: do we need this type or can we just have a tuple? @@ -100,7 +101,7 @@ def ascii_export(table, datalabel="Data", dataunits="units"): yield "{:^10} {:^10} {:^6} {:^6} {:^6} {:^15}".format("Date", "UT", "Lat.", "Lon.", "Alt.", datalabel) yield "{:^10} {:^10} {:^6} {:^6} {:^6} {:^15}".format("(YYYYDDD)", "(ms)", "(deg.)", "(deg.)", "(km)", "(%s)" % dataunits) for row in table: - yield "{:>10} {:>10} {:>6.02f} {:>6.02f} {:>6.02f} {:>15.06f}".format(row.date, row.ut, row.lat, row.lon, row.alt, row.data) + yield "{:>10} {:>10} {:>6.02f} {:>6.02f} {:>6.02f}".format(row.date, row.ut, row.lat, row.lon, row.alt) + "".join(" {:>15.06f}".format(data_comp) for data_comp in row.data) def csv_export(table, datalabel="Data", dataunits="units"): """ @@ -115,7 +116,7 @@ def csv_export(table, datalabel="Data", dataunits="units"): """ yield '"{}","{}","{}","{}","{}","{}"'.format("Date (YYYYDDD)", "UT (ms)", "Longitude (deg)", "Latitude (deg)", "Altitude (km)", datalabel + "(%s)" % dataunits) for row in table: - yield ",".join(str(x) for x in [row.date, row.ut, row.lon, row.lat, row.alt, row.data]) + yield ",".join(str(x) for x in itertools.chain([row.date, row.ut, row.lon, row.lat, row.alt], row.data)) diff --git a/backend/promis/orbit.py b/backend/promis/orbit.py index 37faa46..44e47aa 100644 --- a/backend/promis/orbit.py +++ b/backend/promis/orbit.py @@ -44,12 +44,12 @@ def cord_conv(RX, RY, RZ, **kwargs): return OrbitPoint(math.degrees(φ), math.degrees(λ), ρ - _earth_radius) # Generating an orbit point every 1 second, discarding extra point and filling the gaps -def generate_orbit(datapoints, orbit_start, orbit_end): +def generate_orbit(datapoints, orbit_start, orbit_end, time_delta = 0): datakeys = datapoints.keys() time_start, time_end = min(datakeys), max(datakeys) orbit_len = orbit_end - orbit_start - assert(orbit_end <= time_end and orbit_start >= time_start) + assert((orbit_end - time_delta) <= time_end and (orbit_start + time_delta) >= time_start) # Anchor points from which the curve is deduced # anchor[t] is a list of 4 known timepoints: 2 before t + 2 after t if possible @@ -73,7 +73,7 @@ def generate_orbit(datapoints, orbit_start, orbit_end): if i in datakeys: anchor[0].append(i) i += 1 - + # Pass 2: Copying the anchor over as long as no new points are encountered # If we do encounter a new point, shift the list to the left and add it last_anchor = 0 diff --git a/backend/promis/parsers.py b/backend/promis/parsers.py index ddc6107..aa63759 100644 --- a/backend/promis/parsers.py +++ b/backend/promis/parsers.py @@ -28,9 +28,12 @@ # TODO: replace ValueErrors with meaningful exception classes when integrating # or make something like DataImportError(), whatever -def telemetry(fp): +def telemetry(fp, cartesian=True): """ Parses the telemetry .txt file used in Potential and possibly some other satellites. + If cartesian is true, then the parser looks for RX, RY, RZ sections and converts to + geographic coordinates. + Otherwise the parser expects V_ALT, V_LAT and V_LONG as ready-to use data. Yields time, (time, lon, lat, alt) tuples. """ @@ -40,7 +43,8 @@ def telemetry(fp): # I'm going with route #2 for now, no particular reason, just think it will be more elegant in code # Pointers to the current reading positions in the file per section - sections_index = { "RX": -1 , "RY": -1, "RZ": -1 } + # Yes, Variant's ones have a space before the name. Yush! + sections_index = { "RX": -1 , "RY": -1, "RZ": -1 } if cartesian else { " V_LAT": -1, " V_LONG": -1, " V_ALT": -1 } # Regular expression to match the sections above sections_rx = "^@(%s)" % "|".join(sections_index) @@ -67,8 +71,9 @@ def scan_sect(sect): fp.seek(sections_index[sect]) # Read a line, exit the iteration if it's the end of input + # Variant doesn't have proper spacing, so stop at new section as well ln = fp.readline() - if ln.rstrip() == "": + if ln.rstrip() == "" or ln[0] == '@': break # Record the new position @@ -76,10 +81,14 @@ def scan_sect(sect): # Try to parse the data # NOTE: expected format: , ignoring the last one - m = re.search("^[0-9]* ([0-9.-]*) (2.*)", ln) + m = re.search("^([0-9]+) *([0-9.-]+) *(2.*)?", ln) if m: + # Potential had human readable time at the end and onboard time in first column + # Variant seems(!) to have UNIX time in first column and no third one + time_mark = unix_time.str_to_utc(m.group(3)) if m.group(3) else int(m.group(1)) + # Yielding a nested tuple e.g. ( "RX", (1, 432.0) ), will be converted to dict - yield ( sect, (unix_time.str_to_utc(m.group(2)), float(m.group(1))) ) + yield ( sect, (time_mark, float(m.group(2))) ) else: raise ValueError("Input inconsistency detected") @@ -100,7 +109,13 @@ def scan_point(): for k,v in nextpoint.items(): nextpoint[k] = v[1] - yield timemark, orbit.cord_conv(**nextpoint) + # Convert if the input is cartesian, otherwise just construct a class + if cartesian: + point_value = orbit.cord_conv(**nextpoint) + else: + point_value = orbit.OrbitPoint(*nextpoint.values()) + + yield timemark, point_value except StopIteration: pass diff --git a/frontend/app/components/CesiumMap.js b/frontend/app/components/CesiumMap.js index c11bf9e..896904e 100644 --- a/frontend/app/components/CesiumMap.js +++ b/frontend/app/components/CesiumMap.js @@ -486,7 +486,7 @@ export default class CesiumContainer extends Component { /* data is [lat, lon, hgt] */ data.forEach(function(point) { // TODO temporary disabling altitude because it stores time temporarily - cartesians.push(Cartesian3.fromDegrees(point[1], point[0], /*point[2] ? point[2] :*/ 250000)); + cartesians.push(Cartesian3.fromDegrees(point[1], point[0], point[2] ? point[2] *1000 : 250000)); }); return this.viewer.entities.add({