GeoNet / fits

Field Time Series
Apache License 2.0
4 stars 13 forks source link

BLOCKED: plot together diffeerent methods with same typeID #83

Open elidana opened 8 years ago

elidana commented 8 years ago

Hi,

how can I select what method I want to plot (or download), if a typeID has more than one method associated to it? See, e.g.: http://fits.geonet.org.nz/method?typeID=e

For example, if I want to plot/download typeID=e&methodID=bernese5 , and compare it to typeID=e&methodID=gamit/globk , is there a way to do that?

I've tried a few combination of url including the method/methodID but can't find the correct parameter combination, and don't find it in the FITS API page.

This question is coming after some discussion here #82

Is there any equivalent for other Low-frequency data types?

thanks

rumachan commented 8 years ago

Hi Elisabetta,

You can plot multiple methods for a single typeID with a url such as https://fits.geonet.org.nz/plot?networkID=VO&siteID=WI200&typeID=z&showMethod=true

Does that help?

elidana commented 8 years ago

hi @rumachan ,

thanks for your reply!!!

But...sorry to say that it is not working for me unfortunately! If I plot https://fits.geonet.org.nz/plot?networkID=LI&siteID=GISB&typeID=e&showMethod=true this is showing results for the "Gamit/GlobK" method only

but I think I've found why it's not working... if I look up the observations for the bernese5 method, the data are empty https://fits.geonet.org.nz/observation?networkID=LI&siteID=GISB&typeID=e&methodID=bernese5

typeID=e has 2 methods associated: https://fits.geonet.org.nz/method?typeID=e Not sure why they are empty though. The bernese time series have been uploaded to FITS until the end of April 2015. Then I've stopped this upload, and started to upload time series produced with Gamit.

I might be confused, but I think the bernese data shouldn't have been overwritten by gamit ones , that have a different methodID in the json file. Unless we decided at that time to delete the bernese time series from FITS, and I don't remember (which is quite common for me...my neurons can keep a maximum of 3 information per time, two of them usually being occupied to the grocery list).

Am I missing something here?

rumachan commented 8 years ago

Hi @elidana

It must depend on exactly how --delete-first operates. I believe yo always use that with your uploads. Delete all existing first and then upload the data in the CSV files without checking if they already exist in FITS.

I would say we want it to work the way you describe, but maybe it doesn't. I'll try a test data set later and let you know

elidana commented 8 years ago

Hi @rumachan ,

yes, you're right. I need to use the --delete-first option when I do the upload.

fits-loader --config-file fits-loader.json --delete-first --syslog --data-dir $dir

But, given that the associated json file is different between the bernese and gamit time series, I was assuming that both data can exist at the same time in the database.

I don't need this to happen, so is not a major issue not having both, I was just curious to know how it works! (and might come handy to have the possibility to have different methods associated to the same type?)

How do you deal with your "z" type, for example? Are the different methods used in different times, so that you never have a time overlap of two different methods?

Or maybe I'm doing something wrong with my json files? this is an example of the json file I upload with each time series

{
        "type": "Point",
        "properties": {
                "networkID": "LI",
                "groundRelationship": -2.0,
                "methodID": "gamit",
                "name": "Hokitika",
                "typeID": "u",
                "height": 53.6588,
                "siteID": "HOKI"
        },
        "coordinates": [
                170.9843154,
                -42.71290752
        ]
}
rumachan commented 8 years ago

@elidana

I loaded some test data (temperature with one methodID). I then loaded some data for the same time intervals (three temperature values) at the same siteID, same typeID, but different methodID, and I used --delete-first for the second upload.

Result - the first data I loaded were overwritten, despite the different methoID.

If I do it without --delete-first, it works the way you expected. http://fits.geonet.org.nz/plot?networkID=VO&siteID=SSTEST&typeID=t&type=scatter&showMethod=true

I think this is something we should discuss with @gclitheroe if we want it to work the way you expected.

Your json file looks fine to me.

elidana commented 8 years ago

@rumachan ,

many thanks for testing it! I did the same process, and it works as you anticipated!

To avoid confusion in the plot, I'll now reupload gamit tseries with the --delete-first option, so that the bernese timeseries will not show up in the graph with the same color as the gamit ones.

Soooo......I can change my request in this ticket with a 'would be nice to have if someone is really bored' new feature:

if a given typeID has more than one methodID associated with it (and data are existing in the database?) then the plot will automatically switch to use different colour for each method, maybe something like ... https://github.com/GeoNet/fits/blob/master/plot_site.go#L185 ?

...if that makes any sense

elidana commented 7 years ago

BLOCKED (at least for GPS/GNSS time series) , same reason as in https://github.com/GeoNet/fits/issues/82#issuecomment-310250929