Qmulti How-To Guide
This guide will address some common tasks that may be necessary when computing Qmulti.
How to change variables/variable weights
By default, Qmulti uses the following variables and weights:
- rainfall: 0.33,
- dryspells: 0.47,
- NDVI: 0.2
In some cases, you may want to try using different variables, or changing the weights of variables. This can be done by passing a config option when calling q_multi.
config is a dictionary which contains the key of [satellite, datasource], importance weight, aggregation method (eg.last dekad, average etc), and whether to invert the variable (for example, a higher number for dryspells indicates greater drought so the variable must be inverted before combining with other variables). Default aggregation method and inversions are provided and can be omitted from the config dictionary unless the default is different from what is desired.
If you wanted to add temperature, for example, you could create a config dictionary such as this:
config= {0:[['CHIRPS','r1h_dekad'],0.25,'last_dekad',False],
1:[['MODIS','NDVI_smoothed_5KM'],0.15,'average',False],
2:[['CHIRPS','dlx_dekad'],0.35,'last_dekad',True],
3:[['MODIS','LST_smoothed_5KM'],0.25,'average',True]}
and then specify the config when running qmulti:
Q_multi, indicators_Qs, monthly_Qs = q_multi(area,begin,end,config)