Commit 3c6cda68d21179b7b278533b93fc20878288b939
1 parent
1bdbc8d2
Exists in
master
Mise à jour avec nettoyage du code de app/main.py et suppression de fichiers obsolètes
Showing
13 changed files
with
116 additions
and
398 deletions
Show diff stats
comet_server/Dockerfile
... | ... | @@ -11,4 +11,4 @@ RUN apt-get update && apt-get -y install \ |
11 | 11 | python-jinja2 |
12 | 12 | COPY main.py /tmp/ |
13 | 13 | RUN pip install comet |
14 | -CMD twistd -n comet --local-ivo=ivo://hotwired.org/test & python /tmp/main.py | |
14 | +CMD twistd -n comet -r --local-ivo=ivo://hotwired.org/test & python /tmp/main.py | |
... | ... |
comet_server/main.py
... | ... | @@ -6,12 +6,12 @@ from os import stat |
6 | 6 | |
7 | 7 | if __name__ == '__main__': |
8 | 8 | print ("Si tout va bien, on a rien vu !") |
9 | - voeventfile = '/var/tmp/new_voevent_example.xml' | |
10 | - infos = stat('/var/tmp/new_voevent_example.xml') | |
9 | + voeventfile = '/var/tmp/new_voevent.xml' | |
10 | + infos = stat('/var/tmp/new_voevent.xml') | |
11 | 11 | time = asctime(localtime(infos[8])) |
12 | 12 | while True: |
13 | - infos = stat('/var/tmp/new_voevent_example.xml') | |
13 | + infos = stat('/var/tmp/new_voevent.xml') | |
14 | 14 | newtime = asctime(localtime(infos[8])) |
15 | 15 | if newtime>time: |
16 | - os.system('</var/tmp/new_voevent_example.xml comet-sendvo --host=localhost') | |
16 | + os.system('</var/tmp/new_voevent.xml comet-sendvo --host=localhost') | |
17 | 17 | time = newtime |
... | ... |
flask_app/app/forms.py
... | ... | @@ -16,6 +16,7 @@ class ContactForm(FlaskForm): |
16 | 16 | Olongitude = IntegerField("Observer Longitude") |
17 | 17 | Olatitude = IntegerField("Observer Latitude") |
18 | 18 | comet = TextField("Flash Source") |
19 | + instrument = TextField("Instrument Description") | |
19 | 20 | submit = SubmitField("Send") |
20 | 21 | |
21 | 22 | |
... | ... | @@ -33,6 +34,7 @@ class ContactFormLunar(FlaskForm): |
33 | 34 | Olongitude = IntegerField("Observer Longitude") |
34 | 35 | Olatitude = IntegerField("Observer Latitude") |
35 | 36 | comet = TextField("Flash Source") |
37 | + instrument = TextField("Instrument Description") | |
36 | 38 | submit = SubmitField("Send") |
37 | 39 | |
38 | 40 | class ContactFormComet(FlaskForm): |
... | ... |
flask_app/app/main.py
... | ... | @@ -14,6 +14,7 @@ from forms import ContactForm , ContactFormLunar, ContactFormComet |
14 | 14 | |
15 | 15 | app =Flask(__name__) |
16 | 16 | app.secret_key = 'development key' |
17 | + | |
17 | 18 | @app.route('/') |
18 | 19 | def home(): |
19 | 20 | return render_template('home.html') |
... | ... | @@ -29,12 +30,7 @@ def index(): |
29 | 30 | voevent_id = uuid.uuid4() |
30 | 31 | # Get the date |
31 | 32 | date=str(datetime.datetime.strptime(request.form['DateTime'],"%Y-%m-%d %H:%M:%S")) |
32 | - year = int(date[0:4]) | |
33 | - month = int(date[5:7]) | |
34 | - day = int(date[8:10]) | |
35 | - hour = int(date[11:13]) | |
36 | - mn = int(date[14:16]) | |
37 | - seconds = int(date[17:19]) | |
33 | + my_datetime=date[0:10]+"T"+date[11:19] | |
38 | 34 | |
39 | 35 | # Set the basic packet ID and Author details |
40 | 36 | |
... | ... | @@ -43,14 +39,6 @@ def index(): |
43 | 39 | |
44 | 40 | TEMPLATE_FILE = "/tmp/voevent-fireball.xml" |
45 | 41 | template = templateEnv.get_template( TEMPLATE_FILE ) |
46 | - my_datetime=date | |
47 | - my_datetime=date[0:10]+"T"+date[11:19] | |
48 | - my_shortname=request.form['shortname'] | |
49 | - my_contactname=request.form['observer'] | |
50 | - my_contactphone=request.form['phone'] | |
51 | - my_contactemail=request.form['mail'] | |
52 | - my_city=request.form['city'] | |
53 | - my_country=request.form['country'] | |
54 | 42 | |
55 | 43 | # using dictionary to fill information |
56 | 44 | # case of what list [value, datatype, ucd] |
... | ... | @@ -71,59 +59,25 @@ def index(): |
71 | 59 | my_list_wherewhen_time={"time_obs":"2017-02-24T11:07:28.1Z", |
72 | 60 | "time_scale":"UTC", |
73 | 61 | "target_origin":"Earth"} |
74 | - my_list_how={"data_source_type":"observation"} | |
75 | - my_list_how_instrument={"instrument_host_name":"My Home", | |
76 | - "instrument_name":"Celestron 8", | |
77 | - "observer_name":"Pierre Le Sidaner", | |
78 | - "observer_country":"France"} | |
79 | - my_list_how_obs_location={"obs_longitude":"45.147", | |
80 | - "obs_latitude":"85.78", | |
81 | - "obs_altitude":"4000.4"} | |
82 | - my_list_whenwhere_observatory_location={"longitude":"45.147", | |
83 | - "latitude":"85.78", | |
84 | - "altitude":"4000.4"} | |
62 | + my_list_how_instrument={"instrument_description":request.form['instrument']} | |
85 | 63 | |
86 | 64 | # one dictionary for all field description |
87 | 65 | my_list_description = {"what":request.form['description']} |
88 | 66 | |
89 | - # cas d'une liste | |
90 | - # peu utile ici on a tj besoin de key value | |
91 | - print (my_list_how["data_source_type"]) | |
92 | - print (template.render(voevent_id=voevent_id, | |
93 | - my_shortname=my_shortname, | |
94 | - my_contactname=my_contactname, | |
95 | - my_contactphone=my_contactphone, | |
96 | - my_contactemail=my_contactemail, | |
97 | - my_datetime=my_datetime, | |
98 | - my_city=my_city, | |
99 | - my_country=my_country, | |
100 | - my_list_what=my_list_what, | |
101 | - my_list_wherewhen_target=my_list_wherewhen_target, | |
102 | - my_list_wherewhen_time=my_list_wherewhen_time, | |
103 | - my_list_how=my_list_how, | |
104 | - my_list_how_instrument=my_list_how_instrument, | |
105 | - my_list_how_obs_location=my_list_how_obs_location, | |
106 | - my_list_description=my_list_description, | |
107 | - my_groupname_source=my_groupname_source, | |
108 | - my_list_groupname_source=my_list_groupname_source, | |
109 | - my_groupname=my_groupname, | |
110 | - my_list_groupname=my_list_groupname)) | |
111 | - output_filename = '/var/tmp/new_voevent_example.xml' | |
67 | + output_filename = '/var/tmp/new_voevent.xml' | |
112 | 68 | new_voevent = open(output_filename,'w') |
113 | 69 | new_voevent.write(template.render(voevent_id=voevent_id, |
114 | - my_shortname=my_shortname, | |
115 | - my_contactname=my_contactname, | |
116 | - my_contactphone=my_contactphone, | |
117 | - my_contactemail=my_contactemail, | |
70 | + my_shortname=request.form['shortname'], | |
71 | + my_contactname=request.form['observer'], | |
72 | + my_contactphone=request.form['phone'], | |
73 | + my_contactemail=request.form['mail'], | |
118 | 74 | my_datetime=my_datetime, |
119 | - my_city=my_city, | |
120 | - my_country=my_country, | |
75 | + my_city=request.form['city'], | |
76 | + my_country=request.form['country'], | |
121 | 77 | my_list_what=my_list_what, |
122 | 78 | my_list_wherewhen_target=my_list_wherewhen_target, |
123 | 79 | my_list_wherewhen_time=my_list_wherewhen_time, |
124 | - my_list_how=my_list_how, | |
125 | 80 | my_list_how_instrument=my_list_how_instrument, |
126 | - my_list_how_obs_location=my_list_how_obs_location, | |
127 | 81 | my_list_description=my_list_description, |
128 | 82 | my_groupname_source=my_groupname_source, |
129 | 83 | my_list_groupname_source=my_list_groupname_source, |
... | ... | @@ -145,12 +99,7 @@ def indexlunar(): |
145 | 99 | voevent_id = uuid.uuid4() |
146 | 100 | # Get the date |
147 | 101 | date=str(datetime.datetime.strptime(request.form['DateTime'],"%Y-%m-%d %H:%M:%S")) |
148 | - year = int(date[0:4]) | |
149 | - month = int(date[5:7]) | |
150 | - day = int(date[8:10]) | |
151 | - hour = int(date[11:13]) | |
152 | - mn = int(date[14:16]) | |
153 | - seconds = int(date[17:19]) | |
102 | + my_datetime=date[0:10]+"T"+date[11:19] | |
154 | 103 | |
155 | 104 | # Set the basic packet ID and Author details |
156 | 105 | |
... | ... | @@ -159,14 +108,6 @@ def indexlunar(): |
159 | 108 | |
160 | 109 | TEMPLATE_FILE = "/tmp/voevent-lunar.xml" |
161 | 110 | template = templateEnv.get_template( TEMPLATE_FILE ) |
162 | - my_datetime=date | |
163 | - my_datetime=date[0:10]+"T"+date[11:19] | |
164 | - my_shortname=request.form['shortname'] | |
165 | - my_contactname=request.form['observer'] | |
166 | - my_contactphone=request.form['phone'] | |
167 | - my_contactemail=request.form['mail'] | |
168 | - my_city=request.form['city'] | |
169 | - my_country=request.form['country'] | |
170 | 111 | |
171 | 112 | # using dictionary to fill information |
172 | 113 | # case of what list [value, datatype, ucd] |
... | ... | @@ -187,60 +128,25 @@ def indexlunar(): |
187 | 128 | my_list_wherewhen_time={"time_obs":"2017-02-24T11:07:28.1Z", |
188 | 129 | "time_scale":"UTC", |
189 | 130 | "target_origin":"Earth"} |
190 | - my_list_how={"data_source_type":"observation"} | |
191 | - my_list_how_instrument={"instrument_host_name":"My Home", | |
192 | - "instrument_name":"Celestron 8", | |
193 | - "observer_name":"Pierre Le Sidaner", | |
194 | - "observer_country":"France"} | |
195 | - my_list_how_obs_location={"obs_longitude":"45.147", | |
196 | - "obs_latitude":"85.78", | |
197 | - "obs_altitude":"4000.4"} | |
198 | - my_list_whenwhere_observatory_location={"longitude":"45.147", | |
199 | - "latitude":"85.78", | |
200 | - "altitude":"4000.4"} | |
131 | + my_list_how_instrument={"instrument_description":request.form['instrument']} | |
201 | 132 | |
202 | 133 | # one dictionary for all field description |
203 | 134 | my_list_description = {"what":request.form['description']} |
204 | 135 | |
205 | - | |
206 | - # cas d'une liste | |
207 | - # peu utile ici on a tj besoin de key value | |
208 | - print (my_list_how["data_source_type"]) | |
209 | - print (template.render(voevent_id=voevent_id, | |
210 | - my_shortname=my_shortname, | |
211 | - my_contactname=my_contactname, | |
212 | - my_contactphone=my_contactphone, | |
213 | - my_contactemail=my_contactemail, | |
214 | - my_datetime=my_datetime, | |
215 | - my_city=my_city, | |
216 | - my_country=my_country, | |
217 | - my_list_what=my_list_what, | |
218 | - my_list_wherewhen_target=my_list_wherewhen_target, | |
219 | - my_list_wherewhen_time=my_list_wherewhen_time, | |
220 | - my_list_how=my_list_how, | |
221 | - my_list_how_instrument=my_list_how_instrument, | |
222 | - my_list_how_obs_location=my_list_how_obs_location, | |
223 | - my_list_description=my_list_description, | |
224 | - my_groupname_source=my_groupname_source, | |
225 | - my_list_groupname_source=my_list_groupname_source, | |
226 | - my_groupname=my_groupname, | |
227 | - my_list_groupname=my_list_groupname)) | |
228 | - output_filename = '/var/tmp/new_voevent_example.xml' | |
136 | + output_filename = '/var/tmp/new_voevent.xml' | |
229 | 137 | new_voevent = open(output_filename,'w') |
230 | 138 | new_voevent.write(template.render(voevent_id=voevent_id, |
231 | - my_shortname=my_shortname, | |
232 | - my_contactname=my_contactname, | |
233 | - my_contactphone=my_contactphone, | |
234 | - my_contactemail=my_contactemail, | |
139 | + my_shortname=request.form['shortname'], | |
140 | + my_contactname=request.form['observer'], | |
141 | + my_contactphone=request.form['phone'], | |
142 | + my_contactemail=request.form['mail'], | |
235 | 143 | my_datetime=my_datetime, |
236 | - my_city=my_city, | |
237 | - my_country=my_country, | |
144 | + my_city=request.form['city'], | |
145 | + my_country=request.form['country'], | |
238 | 146 | my_list_what=my_list_what, |
239 | 147 | my_list_wherewhen_target=my_list_wherewhen_target, |
240 | 148 | my_list_wherewhen_time=my_list_wherewhen_time, |
241 | - my_list_how=my_list_how, | |
242 | 149 | my_list_how_instrument=my_list_how_instrument, |
243 | - my_list_how_obs_location=my_list_how_obs_location, | |
244 | 150 | my_list_description=my_list_description, |
245 | 151 | my_groupname_source=my_groupname_source, |
246 | 152 | my_list_groupname_source=my_list_groupname_source, |
... | ... | @@ -263,12 +169,7 @@ def indexcomet(): |
263 | 169 | voevent_id = uuid.uuid4() |
264 | 170 | # Get the date |
265 | 171 | date=str(datetime.datetime.strptime(request.form['DateTime'],"%Y-%m-%d %H:%M:%S")) |
266 | - year = int(date[0:4]) | |
267 | - month = int(date[5:7]) | |
268 | - day = int(date[8:10]) | |
269 | - hour = int(date[11:13]) | |
270 | - mn = int(date[14:16]) | |
271 | - seconds = int(date[17:19]) | |
172 | + my_datetime=date[0:10]+"T"+date[11:19] | |
272 | 173 | |
273 | 174 | # Set the basic packet ID and Author details |
274 | 175 | |
... | ... | @@ -277,14 +178,6 @@ def indexcomet(): |
277 | 178 | |
278 | 179 | TEMPLATE_FILE = "/tmp/voevent-comet.xml" |
279 | 180 | template = templateEnv.get_template( TEMPLATE_FILE ) |
280 | - my_datetime=date | |
281 | - my_datetime=date[0:10]+"T"+date[11:19] | |
282 | - my_shortname=request.form['shortname'] | |
283 | - my_contactname=request.form['observer'] | |
284 | - my_contactphone=request.form['phone'] | |
285 | - my_contactemail=request.form['mail'] | |
286 | - my_city=request.form['city'] | |
287 | - my_country=request.form['country'] | |
288 | 181 | |
289 | 182 | # using dictionary to fill information |
290 | 183 | # case of what list [value, datatype, ucd] |
... | ... | @@ -304,29 +197,16 @@ def indexcomet(): |
304 | 197 | # one dictionary for all field description |
305 | 198 | my_list_description = {"what":"Tail disconnection of comet 67P"} |
306 | 199 | |
307 | - print (template.render(voevent_id=voevent_id, | |
308 | - my_shortname=my_shortname, | |
309 | - my_contactname=my_contactname, | |
310 | - my_contactphone=my_contactphone, | |
311 | - my_contactemail=my_contactemail, | |
312 | - my_datetime=my_datetime, | |
313 | - my_city=my_city, | |
314 | - my_country=my_country, | |
315 | - my_list_what=my_list_what, | |
316 | - my_list_wherewhen_target=my_list_wherewhen_target, | |
317 | - my_list_description=my_list_description, | |
318 | - my_groupname=my_groupname, | |
319 | - my_list_groupname=my_list_groupname)) | |
320 | - output_filename = '/var/tmp/new_voevent_example.xml' | |
200 | + output_filename = '/var/tmp/new_voevent.xml' | |
321 | 201 | new_voevent = open(output_filename,'w') |
322 | 202 | new_voevent.write(template.render(voevent_id=voevent_id, |
323 | - my_shortname=my_shortname, | |
324 | - my_contactname=my_contactname, | |
325 | - my_contactphone=my_contactphone, | |
326 | - my_contactemail=my_contactemail, | |
203 | + my_shortname=request.form['shortname'], | |
204 | + my_contactname=request.form['observer'], | |
205 | + my_contactphone=request.form['phone'], | |
206 | + my_contactemail=request.form['mail'], | |
327 | 207 | my_datetime=my_datetime, |
328 | - my_city=my_city, | |
329 | - my_country=my_country, | |
208 | + my_city=request.form['city'], | |
209 | + my_country=request.form['country'], | |
330 | 210 | my_list_what=my_list_what, |
331 | 211 | my_list_wherewhen_target=my_list_wherewhen_target, |
332 | 212 | my_list_description=my_list_description, |
... | ... |
... | ... | @@ -0,0 +1,68 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<voe:VOEvent ivorn="ivo://vopdc.obspm/VOEvent/#01604fa2-6b43-467b-aa51-861c54eff5c7" | |
3 | + role="test" version="2.0" | |
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
5 | + xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0" | |
6 | + xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"> | |
7 | + <Who> | |
8 | + <AuthorIVORN>ivo://psws/not_registered_yet</AuthorIVORN> | |
9 | + <Author> | |
10 | + <shortName>MG</shortName> | |
11 | + <contactName>Michel GANGLOFF</contactName> | |
12 | + <contactPhone>604086971</contactPhone> | |
13 | + <contactEmail>Michel.Gangloff@yahoo.fr</contactEmail> | |
14 | + </Author> | |
15 | + <Date>2017-09-27T10:47:00</Date> | |
16 | + </Who> | |
17 | + <What> | |
18 | + <Description> | |
19 | + Location of observation : Toulouse,France | |
20 | + M | |
21 | + </Description> | |
22 | + <Param name="event_status" value="finished" dataType="string" ucd="meta.flag" /> | |
23 | + <Param name="event_type" value="giant planet fireball" dataType="string" ucd="meta.flag" /> | |
24 | + <Group name="target"> | |
25 | + <Param name="target_name" value="Jupiter" dataType="string" ucd="meta.id" /> | |
26 | + <Param name="target_class" value="planet" dataType="string" ucd="meta.id" /> | |
27 | + <Param name="target_region" value="atmosphere" dataType="string" ucd="meta.id" /> | |
28 | + <Param name="latitude" value="0" dataType="float" ucd="pos.bodyrc.lat" unit="deg" /> | |
29 | + <Param name="longitude" value="0" dataType="float" ucd="pos.bodyrc.lon" unit="deg" /> | |
30 | + </Group> | |
31 | + <Group name="source"> | |
32 | + <Param name="target_name" value="0" dataType="string" ucd="meta.id" /> | |
33 | + <Param name="target_class" value="comet" dataType="string" ucd="meta.id" /> | |
34 | + <Param name="target_region" value="trail" dataType="string" ucd="meta.id" /> | |
35 | + </Group> | |
36 | + </What> | |
37 | + <WhereWhen> | |
38 | + <ObsDataLocation> | |
39 | + <ObservatoryLocation> | |
40 | + <AstroCoordSystem/> | |
41 | + <AstroCoords/> | |
42 | + </ObservatoryLocation> | |
43 | + <ObservationLocation> | |
44 | + <AstroCoordSystem/> | |
45 | + <AstroCoords> | |
46 | + <Time unit="s"> | |
47 | + <TimeInstant> | |
48 | + <ISOTime>2017-09-27T10:47:00</ISOTime> | |
49 | + </TimeInstant> | |
50 | + </Time> | |
51 | + </AstroCoords> | |
52 | + </ObservationLocation> | |
53 | + </ObsDataLocation> | |
54 | + </WhereWhen> | |
55 | + <How> | |
56 | + <Description> | |
57 | + 0 | |
58 | + </Description> | |
59 | + <Reference uri="https://TBD.html" type="url" /> | |
60 | + </How> | |
61 | + <Why> | |
62 | + <Concept>http://TBD</Concept> | |
63 | + <Description>Comet observation</Description> | |
64 | + <Name>67P</Name> | |
65 | + </Why> | |
66 | + <Description> | |
67 | + </Description> | |
68 | +</voe:VOEvent> | |
0 | 69 | \ No newline at end of file |
... | ... |
flask_app/app/templates/index-lunar.html
flask_app/app/templates/index.html
flask_app/app/templates/voevent-psws.html deleted
... | ... | @@ -1,20 +0,0 @@ |
1 | -<html> | |
2 | - <body> | |
3 | - | |
4 | - <form action = "./result" method = "POST"> | |
5 | - <p>ObservatoryLocation <input type = "text" name = "observatorylocation" /></p> | |
6 | - <p>CoordinateSystem <input type = "text" name = "Coordsys" /></p> | |
7 | - <p>Date <input type = "text" name = "date" /></p> | |
8 | - <p>RA <input type ="text" name = "ra" /></p> | |
9 | - <p>DEC <input type ="text" name = "dec" /></p> | |
10 | - <p>Error2Radius <input type ="text" name = "errortoradius" /></p> | |
11 | - <p>Instrument Description <input type ="text" name = "instrumentdescription" /></p> | |
12 | - <p>Instrument Reference <input type ="text" name = "instrumentreference" /></p> | |
13 | - <p>Inference Name <input type ="text" name = "inferencename" /></p> | |
14 | - <p>Inference Concept <input type ="text" name = "inferenceconcept" /></p> | |
15 | - <p>Citations <input type ="text" name = "citations" /></p> | |
16 | - <p><input type = "submit" value = "submit" /></p> | |
17 | - </form> | |
18 | - | |
19 | - </body> | |
20 | -</html> |
flask_app/app/templates/voevent.xml deleted
... | ... | @@ -1,74 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | - | |
3 | -<voe:VOEvent ivorn="ivo://vopdc.obspm/VOEvent/#{{voevent_id}}" | |
4 | - role="observation" version="2.0" | |
5 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
6 | - xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0" | |
7 | - xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"> | |
8 | - | |
9 | - <Who> | |
10 | - <AuthorIVORN>ivo://psws/not_registered_yet</AuthorIVORN> | |
11 | - <Author> | |
12 | - <shortName>amateur</shortName> | |
13 | - <contactName>Pierre Le Sidaner</contactName> | |
14 | - <contactPhone>+33-1 40 51 20 82</contactPhone> | |
15 | - <contactEmail>pierre.lesidaner@obspm.fr</contactEmail> | |
16 | - </Author> | |
17 | - <Date>{{my_datetime}}</Date> | |
18 | - </Who> | |
19 | - <What> | |
20 | - <Description>{{my_list_description["what"]}}</Description> | |
21 | - {%- for key, value in my_list_what.items() %} | |
22 | - <Param name="{{key}}" value="{{value[0]}}" dataType="{{value[1]}}" ucd="{{value[2]}}" /> | |
23 | - {%- endfor %} | |
24 | - {%- for group_param in my_list_groupname %} | |
25 | - <Group name={{my_groupname}}> | |
26 | - {%- for key, value in group_param.items() %} | |
27 | - <Param name="{{key}}" value="{{value[0]}}" dataType="{{value[1]}}" ucd="{{value[2]}}" /> | |
28 | - {%- endfor %} | |
29 | - </Group> | |
30 | - {%- endfor %} | |
31 | - </What> | |
32 | - <WhereWhen> | |
33 | - <ObsDataLocation > | |
34 | - <ObservatoryLocation id="GEOSURFACE" > | |
35 | - <AstroCoordSystem id="UTC-GEOD-TOPO"/> | |
36 | - <AstroCoords coord_system_id="UTC-GEOD-TOPO"> | |
37 | - <Position3D> | |
38 | - | |
39 | - | |
40 | - <ObservationLocation> | |
41 | - <AstroCoordSystem id="UTC-ICRS-TOPO" /> | |
42 | - <AstroCoords coord_system_id="UTC-ICRS-TOPO"> | |
43 | - <Time unit="s"> | |
44 | - <TimeInstant> | |
45 | - <ISOTime>{{my_list_wherewhen_time["time_obs"]}}</ISOTime> | |
46 | - </TimeInstant> | |
47 | - </Time> | |
48 | - <Position2D unit="deg"> | |
49 | - <Value2> | |
50 | - <C1>277.5794</C1> | |
51 | - <!-- RA --> | |
52 | - <C2>-62.3326</C2> | |
53 | - <!-- Dec --> | |
54 | - </Value2> | |
55 | - <Error2Radius>0.0500</Error2Radius> | |
56 | - </Position2D> | |
57 | - </AstroCoords> | |
58 | - </ObservationLocation> | |
59 | - </ObsDataLocation> | |
60 | - </WhereWhen> | |
61 | - <How> | |
62 | - <Description>{{my_list_how_instrument["instrument_name"]}}</Description> | |
63 | - <Reference uri="https://TBD.html" type="url" /> | |
64 | - </How> | |
65 | - <Why> | |
66 | - <Concept>http://TBD</Concept> | |
67 | - <Description>Comet observation</Description> | |
68 | - <Name>{{my_list_wherewhen_target["target_name"]}}</Name> | |
69 | - | |
70 | - | |
71 | - </Why> | |
72 | - <Description> | |
73 | - </Description> | |
74 | -</voe:VOEvent> |
flask_app/app/voevent.xml deleted
... | ... | @@ -1,74 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | - | |
3 | -<voe:VOEvent ivorn="ivo://vopdc.obspm/VOEvent/#{{voevent_id}}" | |
4 | - role="observation" version="2.0" | |
5 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
6 | - xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0" | |
7 | - xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"> | |
8 | - | |
9 | - <Who> | |
10 | - <AuthorIVORN>ivo://psws/not_registered_yet</AuthorIVORN> | |
11 | - <Author> | |
12 | - <shortName>amateur</shortName> | |
13 | - <contactName>Pierre Le Sidaner</contactName> | |
14 | - <contactPhone>+33-1 40 51 20 82</contactPhone> | |
15 | - <contactEmail>pierre.lesidaner@obspm.fr</contactEmail> | |
16 | - </Author> | |
17 | - <Date>{{my_datetime}}</Date> | |
18 | - </Who> | |
19 | - <What> | |
20 | - <Description>{{my_list_description["what"]}}</Description> | |
21 | - {%- for key, value in my_list_what.items() %} | |
22 | - <Param name="{{key}}" value="{{value[0]}}" dataType="{{value[1]}}" ucd="{{value[2]}}" /> | |
23 | - {%- endfor %} | |
24 | - {%- for group_param in my_list_groupname %} | |
25 | - <Group name={{my_groupname}}> | |
26 | - {%- for key, value in group_param.items() %} | |
27 | - <Param name="{{key}}" value="{{value[0]}}" dataType="{{value[1]}}" ucd="{{value[2]}}" /> | |
28 | - {%- endfor %} | |
29 | - </Group> | |
30 | - {%- endfor %} | |
31 | - </What> | |
32 | - <WhereWhen> | |
33 | - <ObsDataLocation > | |
34 | - <ObservatoryLocation id="GEOSURFACE" > | |
35 | - <AstroCoordSystem id="UTC-GEOD-TOPO"/> | |
36 | - <AstroCoords coord_system_id="UTC-GEOD-TOPO"> | |
37 | - <Position3D> | |
38 | - | |
39 | - | |
40 | - <ObservationLocation> | |
41 | - <AstroCoordSystem id="UTC-ICRS-TOPO" /> | |
42 | - <AstroCoords coord_system_id="UTC-ICRS-TOPO"> | |
43 | - <Time unit="s"> | |
44 | - <TimeInstant> | |
45 | - <ISOTime>{{my_list_wherewhen_time["time_obs"]}}</ISOTime> | |
46 | - </TimeInstant> | |
47 | - </Time> | |
48 | - <Position2D unit="deg"> | |
49 | - <Value2> | |
50 | - <C1>277.5794</C1> | |
51 | - <!-- RA --> | |
52 | - <C2>-62.3326</C2> | |
53 | - <!-- Dec --> | |
54 | - </Value2> | |
55 | - <Error2Radius>0.0500</Error2Radius> | |
56 | - </Position2D> | |
57 | - </AstroCoords> | |
58 | - </ObservationLocation> | |
59 | - </ObsDataLocation> | |
60 | - </WhereWhen> | |
61 | - <How> | |
62 | - <Description>{{my_list_how_instrument["instrument_name"]}}</Description> | |
63 | - <Reference uri="https://TBD.html" type="url" /> | |
64 | - </How> | |
65 | - <Why> | |
66 | - <Concept>http://TBD</Concept> | |
67 | - <Description>Comet observation</Description> | |
68 | - <Name>{{my_list_wherewhen_target["target_name"]}}</Name> | |
69 | - | |
70 | - | |
71 | - </Why> | |
72 | - <Description> | |
73 | - </Description> | |
74 | -</voe:VOEvent> |
flask_app/voevent-fireball.xml
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | <AstroCoords> |
52 | 52 | <Time unit="s"> |
53 | 53 | <TimeInstant> |
54 | - <ISOTime>2017-10-12T12:00:05</ISOTime> | |
54 | + <ISOTime>{{my_datetime}}</ISOTime> | |
55 | 55 | </TimeInstant> |
56 | 56 | </Time> |
57 | 57 | </AstroCoords> |
... | ... | @@ -59,7 +59,9 @@ |
59 | 59 | </ObsDataLocation> |
60 | 60 | </WhereWhen> |
61 | 61 | <How> |
62 | - <Description>{{my_list_how_instrument["instrument_name"]}}</Description> | |
62 | + <Description> | |
63 | + {{my_list_how_instrument["instrument_description"]}} | |
64 | + </Description> | |
63 | 65 | <Reference uri="https://TBD.html" type="url" /> |
64 | 66 | </How> |
65 | 67 | <Why> |
... | ... |
flask_app/voevent-lunar.xml
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | <AstroCoords> |
52 | 52 | <Time unit="s"> |
53 | 53 | <TimeInstant> |
54 | - <ISOTime>2017-10-12T12:00:05</ISOTime> | |
54 | + <ISOTime>{{my_datetime}}</ISOTime> | |
55 | 55 | </TimeInstant> |
56 | 56 | </Time> |
57 | 57 | </AstroCoords> |
... | ... | @@ -59,7 +59,9 @@ |
59 | 59 | </ObsDataLocation> |
60 | 60 | </WhereWhen> |
61 | 61 | <How> |
62 | - <Description>{{my_list_how_instrument["instrument_name"]}}</Description> | |
62 | + <Description> | |
63 | + {{my_list_how_instrument["instrument_description"]}} | |
64 | + </Description> | |
63 | 65 | <Reference uri="https://TBD.html" type="url" /> |
64 | 66 | </How> |
65 | 67 | <Why> |
... | ... |
flask_app/voevent.xml deleted
... | ... | @@ -1,74 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | - | |
3 | -<voe:VOEvent ivorn="ivo://vopdc.obspm/VOEvent/#{{voevent_id}}" | |
4 | - role="observation" version="2.0" | |
5 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
6 | - xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0" | |
7 | - xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"> | |
8 | - | |
9 | - <Who> | |
10 | - <AuthorIVORN>ivo://psws/not_registered_yet</AuthorIVORN> | |
11 | - <Author> | |
12 | - <shortName>amateur</shortName> | |
13 | - <contactName>Pierre Le Sidaner</contactName> | |
14 | - <contactPhone>+33-1 40 51 20 82</contactPhone> | |
15 | - <contactEmail>pierre.lesidaner@obspm.fr</contactEmail> | |
16 | - </Author> | |
17 | - <Date>{{my_datetime}}</Date> | |
18 | - </Who> | |
19 | - <What> | |
20 | - <Description>{{my_list_description["what"]}}</Description> | |
21 | - {%- for key, value in my_list_what.items() %} | |
22 | - <Param name="{{key}}" value="{{value[0]}}" dataType="{{value[1]}}" ucd="{{value[2]}}" /> | |
23 | - {%- endfor %} | |
24 | - {%- for group_param in my_list_groupname %} | |
25 | - <Group name={{my_groupname}}> | |
26 | - {%- for key, value in group_param.items() %} | |
27 | - <Param name="{{key}}" value="{{value[0]}}" dataType="{{value[1]}}" ucd="{{value[2]}}" /> | |
28 | - {%- endfor %} | |
29 | - </Group> | |
30 | - {%- endfor %} | |
31 | - </What> | |
32 | - <WhereWhen> | |
33 | - <ObsDataLocation > | |
34 | - <ObservatoryLocation id="GEOSURFACE" > | |
35 | - <AstroCoordSystem id="UTC-GEOD-TOPO"/> | |
36 | - <AstroCoords coord_system_id="UTC-GEOD-TOPO"> | |
37 | - <Position3D> | |
38 | - | |
39 | - | |
40 | - <ObservationLocation> | |
41 | - <AstroCoordSystem id="UTC-ICRS-TOPO" /> | |
42 | - <AstroCoords coord_system_id="UTC-ICRS-TOPO"> | |
43 | - <Time unit="s"> | |
44 | - <TimeInstant> | |
45 | - <ISOTime>{{my_list_wherewhen_time["time_obs"]}}</ISOTime> | |
46 | - </TimeInstant> | |
47 | - </Time> | |
48 | - <Position2D unit="deg"> | |
49 | - <Value2> | |
50 | - <C1>277.5794</C1> | |
51 | - <!-- RA --> | |
52 | - <C2>-62.3326</C2> | |
53 | - <!-- Dec --> | |
54 | - </Value2> | |
55 | - <Error2Radius>0.0500</Error2Radius> | |
56 | - </Position2D> | |
57 | - </AstroCoords> | |
58 | - </ObservationLocation> | |
59 | - </ObsDataLocation> | |
60 | - </WhereWhen> | |
61 | - <How> | |
62 | - <Description>{{my_list_how_instrument["instrument_name"]}}</Description> | |
63 | - <Reference uri="https://TBD.html" type="url" /> | |
64 | - </How> | |
65 | - <Why> | |
66 | - <Concept>http://TBD</Concept> | |
67 | - <Description>Comet observation</Description> | |
68 | - <Name>{{my_list_wherewhen_target["target_name"]}}</Name> | |
69 | - | |
70 | - | |
71 | - </Why> | |
72 | - <Description> | |
73 | - </Description> | |
74 | -</voe:VOEvent> |