ajdawson / eofs

EOF analysis in Python
http://ajdawson.github.io/eofs/
GNU General Public License v3.0
203 stars 60 forks source link

Question about projectField #94

Open lee1043 opened 6 years ago

lee1043 commented 6 years ago

Hi @ajdawson,

I have been used the eofs extensively for my on-going research in recent 2 years. Thanks for your efforts on developing and maintaining this awesome package. I am not sure if this issue board is proper for asking question. Please excuse me if not, but I really do need your help for my following questions.

  1. I understand how eofsAsCovariance and eofsAsCorrelation are different, but couldn't fully understand what eofs is for. Could you please give me some detail about the eofs and how it works differently to above two?

  2. Some interfaces (e.g., eofsAsCovariance, pcs) have pcscaling option while some other interfaces (e.g., eofs, projectField) have eofscaling option. To me it seems like if pcscaling=1, it works with normalized PC time series that has unit variance (please correct me if I am wrong). But I don't fully understand what eofscaling option is for. May I have further detail how the eofscaling option work?

  3. According to the manual, "We could also project another field onto the EOFs to produce a set of pseudo-PCs:pseudo_pcs = solver.projectField(other_field)" I am using this call as below: pseudo_pcs = solver.projectField(field_to_be_projected, neofs=1, eofscaling=0) The eofscaling=0 says the field is being projected onto "un-scaled EOFs" as default. But to me, it seems like EOF pattern of unit variance (map that has spatial deviation = 1) is being projected onto the given field (That is why I asked question 2). I see the projectField is using flatE, which is coming from E. I suspect this E should identical to map of EOF pattern that has unit variance. Could you please confirm or correct this for me?

Thank you for your attention and sorry for deficit of my understanding. Your comment would be tremendously helpful for me. Thank you in advance.

ajdawson commented 6 years ago
  1. eofsAs... provide the correlation/covariance between the PCs and your input data, they are not actually the EOFs. They tell you how each point in space varies like the given mode. The eofs method provides the raw EOFs (eigenvectors of the covariance matrix) which are the spatial patterns the PCs are the coefficeints of.

  2. pcscaling and eofscaling do the same thing, one for methods that work on or return PCs, and one for methods that work on or return EOFs. Just a different name. 0 is unscaled, 1 is scaled to unit variance.

  3. If you set eofscaling=0 you project onto the un-scaled EOF patterns. You need eofscaling=1 to project onto EOFs scaled to unit variance.

lee1043 commented 6 years ago

@ajdawson Thank you for your response.

  1. I was expecting a map given by the eofs(eofscaling=1) should have the unit variance thus the spatial standard deviation of the map equals to 1, but it was not. Could you please give comment on this?

  2. When I want to visualize pattern that being used for the projection as below, pseudo_pcs = solver.projectField(field_to_be_projected, neofs=1, eofscaling=0), I guess I should use a map returned from the eofs(eofscaling=0) because it is obtained from E. Is this correct?

Thank you in advance for your great support.

lee1043 commented 6 years ago

@bonfils2 @gleckler1 FYI...

ajdawson commented 6 years ago

I think the scaling of EOFs may be incorrect actually. I think they are scaled to unit length by default. I don't have time to look into this myself right now. You'll probably have to dive into the source yourself. Follow you instinct, if something isn't right bug fix PRs are always welcome!