kujaku11 / mth5

Exchangeable and archivable format for magnetotelluric time series to better serve the community through FAIR principles.
https://mth5.readthedocs.io/en/latest/index.html
MIT License
16 stars 6 forks source link

Process for Getting Miniseed From IRIS and Submitting StationXML to IRIS #31

Open kkappler opened 3 years ago

kkappler commented 3 years ago

Karl is pulling miniseed data from ROVER with some commands from Tim. These commands yield local mseed files but there are a couple of issues:

  1. In my specific case (PKD) there are some hacks needed for channel codes.
  2. I would like to be able to control where the file lands or have programmatic access to the files that arrive.  I think I need a tutorialand is ready to add it to MTH5

So, lets choose another dataset (Earthscope) and make a dataset summary and then we can take that dataset summary to Tim and get ROVER commands for it, and setup to have programatic access to the resultant files.

kkappler commented 3 years ago

@kujaku11 had the question about: "How do the miniseeds arrive when a request spans more than one epoch?" Jared has tested receiving data into MTH5 via miniseed, but his only examples were for continuous data;

@timronan To run some tests on what happens when you request miniseed for data that has a gap. Also, does the size of the gap matter? Nan-filling? etc.

kkappler commented 3 years ago

The fundamental method to access data_availability and to simultaneously build queries for a run can use this form:

wget "https://service.iris.edu/fdsnws/availability/1/query?format=text&net=BK&sta=PKD&cha=BQ2&starttime=2004-09-25T00:00:00&endtime=2004-09-30T00:00:00&orderby=nslc_time_quality_samplerate&includerestricted=false&merge=samplerate,quality&nodata=404" --output-document rover.txt

Note that the url can be made by: rover_query_url()

And then we can make cmd = f'wget "{url}" --output-document rover.txt' execute_subprocess(cmd)

But we can probably find a python interface that will directly dump the wget output into a dataframe.

kujaku11 commented 3 years ago

We can also look at Obspy, they have tools to get the StationXML and the miniseed files (client.get_waveforms) for this, the user just needs to know network and station, etc.