CLIMADA-project / climada_python

Python (3.8+) version of CLIMADA
GNU General Public License v3.0
321 stars 125 forks source link

`Impact.select()` reset_frequency option #830

Closed timschmi95 closed 9 months ago

timschmi95 commented 11 months ago

Currently, Hazard.select() has a reset_frequency option, but Impact.select() doesn't. I have the use case of having an impact object which is not created through ImpactCalc (i.e. not from any hazard object) and need to select a subsample (e.g. only the last 10 years). In order to get the correct exceedance frequency curve, I need to manually adjust the frequency of the new impact object after the selection. Do you think this is a common enough use case to add a reset_frequency option to impact.select(), equivalent to hazard.select()?

chahank commented 10 months ago

I think this is reasonable yes.

peanutfun commented 10 months ago

@timschmi95 Would you have the capacity to provide a pull request?

timschmi95 commented 10 months ago

Not at the moment, but I should be able to provide a pull request within the next one/two months.

peanutfun commented 9 months ago

Resolved by #847