Skip to content

Commit 991562d

Browse files
some typos and rephrasing
1 parent 7803112 commit 991562d

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

doc/user-guide/climada_measure_config.ipynb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"\n",
2222
"The caveat of defining measure effects as python functions is that it cannot be serialized (written to a file), and also makes reading from a file a challenge.\n",
2323
"\n",
24-
"In order to retain close that gap, the `measure` module now ships `MeasureConfig` objects, which handle the reading, writing and \"declarative\" defining of `Measure` objects.\n",
24+
"In order to close that gap, the `measure` module now ships `MeasureConfig` objects, which handle the reading, writing and \"declarative\" defining of `Measure` objects.\n",
2525
"\n",
2626
"`Measure` objects can be instantiated from `MeasureConfig` objects using `Measure.from_config(<MeasureConfig object>)`.\n",
2727
"\n",
@@ -30,7 +30,7 @@
3030
"| `Measure` | `MeasureConfig` |\n",
3131
"|-----------|--------------------|\n",
3232
"| Is used for the actual computation | Is transformed into a `Measure` for actual computation |\n",
33-
"| Uses python function to define what change to apply to the `Exposures`, `ImpactFuncSet`, `Hazard` objects | Define the changes (functions) to apply via the former way (scaling/shifting effect, alternate file loading, etc.) |\n",
33+
"| Uses python functions to define what change to apply to the `Exposures`, `ImpactFuncSet`, `Hazard` objects | Defines the changes to apply using the (former) declarative way (scaling/shifting effect, alternate file loading, etc.) |\n",
3434
"| Accepts any possible effect as long as it can be defined as a python function | Is restricted to a set of defined effects |\n",
3535
"| Cannot be written to a file (unless it was created by a `MeasureConfig`) | Can easily be read from/written to a file (`.xlsx` or `.yaml`) |"
3636
]
@@ -163,7 +163,7 @@
163163
"\n",
164164
"The `ImpfsetModifierConfig` is used to define how an adaptation measure changes the vulnerability (refer to the [impact functions tutorial](impact-functions-tutorial)).\n",
165165
"\n",
166-
"When \"translated\" to a `Measure` object the `ImpfsetModifierConfig` populates the `impfset_change` attribute with a function that takes an `ImpactFuncSet` and returns a modified one, according to the specifications.\n",
166+
"When \"translated\" to a `Measure` object, the `ImpfsetModifierConfig` populates the `impfset_change` attribute with a function that takes an `ImpactFuncSet` and returns a modified one, according to the specifications.\n",
167167
"\n",
168168
"```{note}\n",
169169
"Modifications are always applied to a specific hazard type (`haz_type` parameter).\n",
@@ -218,12 +218,12 @@
218218
"\n",
219219
"# 1. Scaling existing Impact Functions\n",
220220
"# Let's say we want to simulate a 20% reduction in MDD\n",
221-
"# and a slight shift in the intensity threshold for Hazard 'TC'.\n",
221+
"# and a horziontal translation of the impact function for Hazard 'TC'.\n",
222222
"impf_mod_scaling = ImpfsetModifierConfig(\n",
223223
" haz_type=\"TC\",\n",
224224
" impf_ids=[1, 2], # Apply only to specific function IDs\n",
225225
" impf_mdd_mult=0.8, # Reduce Mean Damage Degree by 20%\n",
226-
" impf_int_add=5.0, # Shift intensity axis by 5 units (e.g., higher resistance)\n",
226+
" impf_int_add=5.0, # Shift intensity array by 5 units, i.e. move impact function by 5 units to the right (e.g., higher resistance)\n",
227227
")\n",
228228
"\n",
229229
"print(\"--- Scaling Config ---\")\n",
@@ -248,7 +248,7 @@
248248
"\n",
249249
"The `HazardModifierConfig` is used to define how an adaptation measure changes the hazard (refer to the [hazard tutorial](hazard-tutorial)).\n",
250250
"\n",
251-
"When \"translated\" to a `Measure` object the `HazardModifierConfig` populates the `hazard_change` attribute with a function that takes a `Hazard` (possibly additional arguments, see below) and returns a modified one, according to the specifications.\n",
251+
"When \"translated\" to a `Measure` object, the `HazardModifierConfig` populates the `hazard_change` attribute with a function that takes a `Hazard` (possibly additional arguments, see below) and returns a modified one, according to the specifications.\n",
252252
"\n",
253253
"```{note}\n",
254254
"Modifications are always applied to a specific hazard type (`haz_type` parameter).\n",
@@ -359,7 +359,7 @@
359359
"\n",
360360
"The `ExposuresModifierConfig` is used to define how an adaptation measure changes the exposure (refer to the [exposure tutorial](exposure-tutorial)).\n",
361361
"\n",
362-
"When \"translated\" to a `Measure` object the `ExposuresModifierConfig` populates the `exposures_change` attribute with a function that takes an `Exposures` and returns a modified one, according to the specifications.\n",
362+
"When \"translated\" to a `Measure` object, the `ExposuresModifierConfig` populates the `exposures_change` attribute with a function that takes an `Exposures` and returns a modified one, according to the specifications.\n",
363363
"\n",
364364
"`ExposuresModifierConfig` allows you to modify the impact function assigned to different hazard, to set a list of points to 0 value, or to load a different Exposures:\n",
365365
"\n",
@@ -402,7 +402,9 @@
402402
"\n",
403403
"# 1. Changing existing Exposures\n",
404404
"exp_mod = ExposuresModifierConfig(\n",
405-
" reassign_impf_id={\"TC\": {1: 2}}, # Remaps exposures points with impf_TC == 1 to 2.\n",
405+
" reassign_impf_id={\n",
406+
" \"TC\": {1: 2}\n",
407+
" }, # Reassigns exposures points with impact function id impf_TC == 1 to 2.\n",
406408
" set_to_zero=[\n",
407409
" 0,\n",
408410
" 25,\n",

0 commit comments

Comments
 (0)