# deconvolution with obspy - using non laplace dataless	file ??

**URL:** <https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371>\
**Category:** Users Mailing List Archive\
**Tags:** archive\
**Created:** [November 19, 2014, 2:53pm UTC](https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371 "2014-11-19T14:53:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mickael\_Langlais1](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Mickael\_Langlais1](https://discourse.obspy.org/u/Mickael_Langlais1)\
**Post date:** [November 19, 2014, 2:53pm UTC](https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371/1 "2014-11-19T14:53:31Z")

</div>

Dear All,

I am trying to process mseed data using dataless seed files that are obviously coded in frequency rather than in laplace transform.

Obspy cannot stand with such non laplace dataless files.

I assume that there is somewhere a 2.PI() factor that as to be apply to convert the laplace in freq (if I am right), but where ?

As this laplace/frequency encoding should be tagged somewhere in the dataless file, could it be possible to make obpsy automatically detected and convert the dataless encoding format ?

At least, Does anybody knows how to convert my frequency coded dataless to laplace dataless files ? Is there any standard scripts ?

Thanks in advance  
Best regards  
Mickael.

---

<div class="post-metadata">

**Author:** ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)\
**Post date:** [November 19, 2014, 3:25pm UTC](https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371/2 "2014-11-19T15:25:07Z")

</div>

Hi Mickael,

there's work in progress on what you're encountering:

> <https://github.com/obspy/obspy/pull/899>
>
> Using this patch permits to work with Poles and Zeros given in Hz (B response ty…pe in Seed documentation).
> \- The poles, zeros are converted in Laplace (rad/s) - seems to be de default behavior of rdseed - 
> \- The normalisation factor is also scaled. 
> \- It applies to Parser and also to the arclink client.
> \- paz\['response\_type'\] was added in the arclink client.

One other thing you could do for a quick fix is to convert your dataless  
to StationXML using IRIS's tool  
([https://seiscode.iris.washington.edu/projects/stationxml-converter/wiki](https://seiscode.iris.washington.edu/projects/stationxml-converter/wiki)) and  
then go via..  
&nbsp;&nbsp;.. read\_inventory(..)  
&nbsp;&nbsp;.. stream.attach\_response(..)  
&nbsp;&nbsp;.. stream.remove\_response(..)  
essentially going via evalresp.

best,  
Tobias

---

<div class="post-metadata">

**Author:** ![Mickael\_Langlais1](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Mickael\_Langlais1](https://discourse.obspy.org/u/Mickael_Langlais1)\
**Post date:** [November 20, 2014, 2:06pm UTC](https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371/3 "2014-11-20T14:06:29Z")

</div>

Thanks Tobias,

I will try the solution using stationXml.

Regards  
Mickael.

Mickaël LANGLAIS

---

<div class="post-metadata">

**Author:** ![Marc\_Grunberg](https://discourse.obspy.org/user_avatar/discourse.obspy.org/marc_grunberg/32/285_2.png) [@Marc\_Grunberg](https://discourse.obspy.org/u/Marc_Grunberg)\
**Post date:** [November 20, 2014, 2:44pm UTC](https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371/4 "2014-11-20T14:44:41Z")

</div>

hi  
I have done a pull request to add this feature  
you can have a look here.

> <https://github.com/obspy/obspy/pull/899>
>
> Using this patch permits to work with Poles and Zeros given in Hz (B response ty…pe in Seed documentation).
> \- The poles, zeros are converted in Laplace (rad/s) - seems to be de default behavior of rdseed - 
> \- The normalisation factor is also scaled. 
> \- It applies to Parser and also to the arclink client.
> \- paz\['response\_type'\] was added in the arclink client.

Travis process failed on this patch because the branch I have used, have a something broken on quakeml  
(so nothing related to laplace)

Reagrds  
Marc

---

<div class="post-metadata">

**Author:** ![Mickael\_Langlais1](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Mickael\_Langlais1](https://discourse.obspy.org/u/Mickael_Langlais1)\
**Post date:** [November 21, 2014, 11:11am UTC](https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371/5 "2014-11-21T11:11:09Z")

</div>

Hi Tobias,

Trying to use your solution, but I am facing an error...

Traceback (most recent call last):  
&nbsp;&nbsp;&nbsp;File "td2a\_deconvolution.py", line 33, in \<module\>  
INV=read\_inventory("/home/langlami/temp/data-stpaulubaye/SURF.xml")  
&nbsp;&nbsp;&nbsp;File "/home/langlami/anaconda/lib/python2.7/site-packages/obspy/station/inventory.py", line 38, in read\_inventory  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return \_readFromPlugin("inventory", path\_or\_file\_object, format=format)[0]  
&nbsp;&nbsp;&nbsp;File "/home/langlami/anaconda/lib/python2.7/site-packages/obspy/core/util/base.py", line 321, in \_readFromPlugin  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raise TypeError('Unknown format for file %s' % filename)  
TypeError: Unknown format for file /home/langlami/temp/data-stpaulubaye/SURF.xml

Does the xml file can stand multiple channels ?

Should I add the format when invoking read\_inventory fonction ? But which one ?

Thanks,  
Mickael.

Mickaël LANGLAIS

---

<div class="post-metadata">

**Author:** ![LionKrischer](https://discourse.obspy.org/user_avatar/discourse.obspy.org/lionkrischer/32/219_2.png) [@LionKrischer](https://discourse.obspy.org/u/LionKrischer)\
**Post date:** [November 21, 2014, 11:59am UTC](https://discourse.obspy.org/t/deconvolution-with-obspy-using-non-laplace-dataless-file/371/6 "2014-11-21T11:59:46Z")

</div>

Hi Mickael,

ObsPy currently uses the StationXML XSD scheme to check if a file is a StationXML file. Many StationXML files out there are strictly speaking not valid StationXML files…  
I guess we should also change our format detection algorithm a bit in that regard.

Just force the format (as you already suggested) with

INV=read\_inventory("/home/langlami/temp/data-stpaulubaye/SURF.xml”, format=“stationxml”)

That will skip the format detection routines and jump straight to the file parsing stage.

Cheers!

Lion
