Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tremblemaps 'lastevent' link breaks when event magnitude changes #31

Open
XavierBeguin opened this issue Sep 16, 2019 · 4 comments
Open
Labels

Comments

@XavierBeguin
Copy link
Collaborator

Currently, when generating a new B3 report, the tremblemaps PROC systematically recreates the link OUTG/PROC.MY_TREMBLEMAPS/events to have it point to the directory of this new B3. This link does therefore not point to the latest B3 in date but to the latest B3 generated by the PROC.

In the scenario where the tremblemaps PROC is run after not having operated for a few days/weeks (e.g. due to an overlooked misconfiguration), it generates the missing B3 by going back in time (i.e. from the latest event to the oldest one). In the end, the lastevent link is left pointing to the oldest previously missing B3, not to the latest B3 in date.

A nice improvement would be to always seek the latest B3 in date when generating the lastevent link.

@XavierBeguin
Copy link
Collaborator Author

Another issue loosely linked to this subject is that when the B3 changes (I guess when an operator creates a new localisation with a different magnitude), the links b3.{gse,jpg,msg,pdf,png,txt} in the OUTG/PROC.MYTREMBLEMAP/YYYY/MM/DD/<sc3id> directory will point to non-existing files.

Thus, when the lastevent link points to this directory, the b3.jpg image cannot be displayed. (It also displays a non-existent image in the list of B-cubes generated by the PROC).

Here is a real world exemple:

$ ls -l 2019/09/27/ovsg2019taludv                                                                                                                                                                                                                             
total 5632
-rw-rw-r-- 1 webobs webobs 5117272 sept. 27 05:01 20190927T084601_b3_Md29_manual.eps
-rw-rw-r-- 1 webobs webobs     727 sept. 27 05:02 20190927T084601_b3_Md29_manual.gse
-rw-rw-r-- 1 webobs webobs    6718 sept. 27 05:02 20190927T084601_b3_Md29_manual.jpg
-rw-rw-r-- 1 webobs webobs    4431 sept. 27 05:02 20190927T084601_b3_Md29_manual.kml
-rw-rw-r-- 1 webobs webobs     586 sept. 27 05:02 20190927T084601_b3_Md29_manual.msg
-rw-rw-r-- 1 webobs webobs   81996 sept. 27 05:02 20190927T084601_b3_Md29_manual.pdf
-rw-rw-r-- 1 webobs webobs  517174 sept. 27 05:02 20190927T084601_b3_Md29_manual.png
-rw-rw-r-- 1 webobs webobs   11318 sept. 27 05:01 20190927T084601_b3_Md29_manual.txt
lrwxrwxrwx 1 webobs webobs      34 sept. 27 05:23 b3.gse -> 20190927T084600_b3_Md28_manual.gse
lrwxrwxrwx 1 webobs webobs      34 sept. 27 05:23 b3.jpg -> 20190927T084600_b3_Md28_manual.jpg
lrwxrwxrwx 1 webobs webobs      34 sept. 27 05:23 b3.msg -> 20190927T084600_b3_Md28_manual.msg
lrwxrwxrwx 1 webobs webobs      34 sept. 27 05:23 b3.pdf -> 20190927T084600_b3_Md28_manual.pdf
lrwxrwxrwx 1 webobs webobs      34 sept. 27 05:23 b3.png -> 20190927T084600_b3_Md28_manual.png
lrwxrwxrwx 1 webobs webobs      34 sept. 27 05:23 b3.txt -> 20190927T084600_b3_Md28_manual.txt
-rw-rw-r-- 1 webobs webobs     858 sept. 27 05:23 mail.txt

@beaudu
Copy link
Member

beaudu commented Sep 28, 2019

The behavior was on purpose to point on the last event processed by the PROC. This is not a bug. But we could add an option like LAST_EVENT_LINK_BY_DATE|Y to specify we want the link on the last event by date.
On the other hand, the broken links are a real issue.

@XavierBeguin
Copy link
Collaborator Author

Alright then. It only felt more logical to me to link to the latest B3 in date, but if you feel linking to the latest generated B3 makes more sense, that's fine by me. It really depends on scientists' needs.

I will rename this issue to focus on the real glitch that is the broken lastevent link.
Thanks!

@XavierBeguin XavierBeguin changed the title tremblemaps should point the 'lastevent' link to the last event in date tremblemaps 'lastevent' link breaks when event magnitude changes Oct 9, 2019
@beaudu
Copy link
Member

beaudu commented Oct 10, 2019

Yes I agree with you it is more logical that default behaviour shows last event in date. But the present behaviour has a specific purpose for observatory crisis management: it shows the last processed event by the proc, that means the last validated or modified event by a human operator. During a seismic swarm, it allows to focus on a single event like the main shock with magnitude updates, even if there is many aftershocks producing also B3 reports at the same time.
Moreover, all B3 reports sorted by date are always available through the MC table.
So certainly the good idea is to add an option and let the scientists choose what to display at the welcome page. We might also make two different links: one lastevent_proc and one lastevent_date. It does not cost a lot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants