Skip to content

Commit ad2e774

Browse files
committed
ref only for apply measure
1 parent 4a8c770 commit ad2e774

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

climada/trajectories/snapshot.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def _convert_to_date(date_arg) -> datetime.date:
191191

192192
raise TypeError("date_arg must be an int, str, or datetime.date")
193193

194-
def apply_measure(self, measure: Measure) -> "Snapshot":
194+
def apply_measure(self, measure: Measure, ref_only: bool = False) -> "Snapshot":
195195
"""Create a new snapshot by applying a Measure object.
196196
197197
This method creates a new `Snapshot` object by applying a measure on
@@ -211,6 +211,11 @@ def apply_measure(self, measure: Measure) -> "Snapshot":
211211
LOGGER.debug("Applying measure %s on snapshot %s", measure.name, id(self))
212212
exp, impfset, haz = measure.apply(self.exposure, self.impfset, self.hazard)
213213
snap = Snapshot(
214-
exposure=exp, hazard=haz, impfset=impfset, date=self.date, measure=measure
214+
exposure=exp,
215+
hazard=haz,
216+
impfset=impfset,
217+
date=self.date,
218+
measure=measure,
219+
ref_only=ref_only,
215220
)
216221
return snap

0 commit comments

Comments
 (0)