Skip to content

Add get_climatology_stdev() - #16

Open
tramsauer wants to merge 6 commits into
pygeo:devfrom
tramsauer:dev
Open

Add get_climatology_stdev()#16
tramsauer wants to merge 6 commits into
pygeo:devfrom
tramsauer:dev

Conversation

@tramsauer

Copy link
Copy Markdown

Added get_climatology_stdev() as discrete method to also extract standard deviation in climatological values.

Comment thread geoval/core/data.py Outdated
mask=(np.isnan(clim) | (n < nmin) |
np.logical_not(
(np.logical_not(self.data.mask)).
mean(axis=0))))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E126 continuation line over-indented for hanging indent

@bulli92 bulli92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Can you please
a) take care of the stickler-bot message and correct the line mentioned

b) what I am missing is a unittest, testing the routine. Please implement one and then redo the PR

Comment thread geoval/core/data.py Outdated
#~ for i in xrange(n):
#~ try:
#~ yy = stats.mstats.linregress(x, dat[:, i])
#~ try:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ try:
#~ yy = stats.mstats.linregress(x, dat[:, i])
#~ try:
#~ yy = stats.mstats.linregress(x, dat[:, i])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ print x
#~ print dat[:,i]
#~ stop
#res[i] = stats.mstats.linregress(x, dat[:, i])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ print dat[:,i]
#~ stop
#res[i] = stats.mstats.linregress(x, dat[:, i])
#~ except:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ stop
#res[i] = stats.mstats.linregress(x, dat[:, i])
#~ except:
#~ print x

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#res[i] = stats.mstats.linregress(x, dat[:, i])
#~ except:
#~ print x
#~ print dat[:,i]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ except:
#~ print x
#~ print dat[:,i]
#~ stop

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ for i in xrange(len(self.time)):
#~ Y,M,D,h,m,s = self._split_time_float(self.time[i])
#~ newdate.append(basedate + relativedelta.relativedelta(years=Y,months=M,days=D,hours=h,minutes=m,seconds=s))
#~ Y,M,D,h,m,s = self._split_time_float(self.time[i])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ Y,M,D,h,m,s = self._split_time_float(self.time[i])
#~ newdate.append(basedate + relativedelta.relativedelta(years=Y,months=M,days=D,hours=h,minutes=m,seconds=s))
#~ Y,M,D,h,m,s = self._split_time_float(self.time[i])
#~ newdate.append(basedate + relativedelta.relativedelta(years=Y,months=M,days=D,hours=h,minutes=m,seconds=s))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py Outdated
#~ ----------
#~ t : float
#~ scalar time indicator
#~ scalar time indicator

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E265 block comment should start with '# '

Comment thread geoval/core/data.py
information on areas from a classic ESRI shapefile
"""
assert isinstance(shape,shp.Reader)
assert isinstance(shape, shp.Reader)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F821 undefined name 'shp'

Comment thread geoval/core/data.py
"""
assert isinstance(shape,shp.Reader)

assert isinstance(shape, shp.Reader)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F821 undefined name 'shp'

@tramsauer

Copy link
Copy Markdown
Author
  • don't know how to deal with shp.Reader --> add import?
  • errors in Travis related to older tests already implemented.
  • my autopep formatter changed code formatting.. if not desired i can use not formatted version and resubmit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants