html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/706#issuecomment-169008093,https://api.github.com/repos/pydata/xarray/issues/706,169008093,MDEyOklzc3VlQ29tbWVudDE2OTAwODA5Mw==,1197350,2016-01-05T13:57:34Z,2016-01-05T13:57:34Z,MEMBER,"Hi Rafael,
I do lots of multidimensional spectral analysis on geophysical data (mostly
ocean satellite fields, this paper
http://journals.ametsoc.org/doi/abs/10.1175/JPO-D-14-0160.1, for
example), and I have recently started trying passing some of these
calculations through xray. An example is in this notebook
https://gist.github.com/rabernat/be4526e157eb1fc69f50, where I define a
function to compute an isotropic power spectrum over specified dimensions.
One huge source of confusion for students starting out with such
calculations is the questions, what are the spectral coordinates that come
out of fft? (E.g. is it ""shifted""?, is there a 2 pi factor in the units?,
etc.) Because of xray's data model, these difficulties can be completely
bypassed by including verbose descriptions of the dimensions and
coordinates.
My view is that spectral analysis is out of scope for xray. However, I
think there is the need for a domain specific spectral analysis package
focused on geophysical data, which would naturally be built on xray. (As a
comparison, consider the nitime http://nipy.org/nitime/ package for
neuroimaging timeseries analysis.) This is something that I, and probably
many others, would be interested in collaborating on. Some features I would
like to see are:
- wrapping of numpy fft to work on xray dataarrays, including proper
handling of coordinates (pretty easy)
- support for different windowing / multitaper methods
- proper treatment of errors
- built-in plotting
- parallelization for out-of-core data (this is a hard one with fft but
would be very useful)
I think such a package would really take off in popularity and would help
to displace MATLAB for this very common type of analysis. The question is
whether there really is enough common interest among different scientists
to justify a new package, as opposed to everyone just ""rolling their own""
solution. Based on your email, it sounds like you might be interested in
such an effort.
Cheers,
Ryan Abernathey
.
On Tue, Jan 5, 2016 at 2:55 AM, Rafael Guedes notifications@github.com
wrote:
> Hi guys,
>
> I have started writing some SpecArray class which inherits from DataArray
> and defines some methods useful for dealing with wave spectra, such as
> calculating spectral wave statistics like significant wave height, peak
> wave period, etc, interpolating, splitting, and performing some other
> tasks. I'd like to ask please if:
> - Is this something you guys would maybe be interested to add to your
> library?
> - Is there a simple way to ensure the methods I am defining are
> preserved when creating a Dataset out of this SpecArray object? currently I
> can create / add to a Dataset using this new object, but all new methods
> get lost by doing that.
>
> Thanks,
> Rafael
>
> —
> Reply to this email directly or view it on GitHub
> https://github.com/pydata/xarray/issues/706.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124915222