src.testing.rapid_tests
¶
Functions for rapid tests.
Module Contents¶
Functions¶
|
Assign rapid tests to group. |
|
Return which individuals get a rapid test in an education setting. |
|
|
|
|
|
|
|
|
|
Calculate demand by household members of positive tested and fresh symptomatics. |
|
Calculate the demand by symptomatic individuals who have no PCR test scheduled. |
|
|
|
Determine who had a potential rapid test triggering event in their household. |
|
- rapid_test_demand(receives_rapid_test, states, params, contacts, seed, save_path=None, randomize=False, share_refuser=None)[source]¶
Assign rapid tests to group.
Starting after Easter, all education workers and pupils attending school receive a test if they participate in school and haven’t received a rapid test within 4 days.
Workers also get tested and more so as time increases.
Lastly, household members of individuals with symptoms, a positive PCR test or a positive rapid test demand a rapid test with 85% probability.
If randomize is True the calculated demand is distributed randomly in the entire population (excluding a share of refusers).
- _calculate_educ_rapid_test_demand(states, contacts, educ_worker_multiplier, student_multiplier, frequency)[source]¶
Return which individuals get a rapid test in an education setting.
- Parameters
states (pandas.DataFrame) – states DataFrame
contacts (pandas.DataFrame) – DataFrame with the same index as states. columns are the contact model names. All education contact models start with educ_. All education columns are recurrent, i.e. are boolean.
educ_worker_multiplier (float) – share of educ workers that have not been tested long enough and have education contacts that receive and accept a test.
student_multiplier (float) – share of school students that have not been tested long enough and have education contacts that receive and accept a test.
frequency (int) – test every [frequency] days
- _calculate_hh_member_rapid_test_demand(states, demand_share)[source]¶
Calculate demand by household members of positive tested and fresh symptomatics.
- Parameters
states (pandas.DataFrame) – sid states DataFrame
demand_share (float) – share of household members that request a rapid test in response to an event in their household. Individuals with a quarantine compliance above 1 - demand_share request a rapid test.
- _calculate_own_symptom_rapid_test_demand(states, demand_share)[source]¶
Calculate the demand by symptomatic individuals who have no PCR test scheduled.
We assume that there is no difference in the propensity to take a rapid test irrespective of whether it’s own symptoms or symptoms in a household member.
- _determine_if_hh_had_event(states)[source]¶
Determine who had a potential rapid test triggering event in their household.
- Returns
- Series with the same index as states.
True for individuals where a household member got symptoms yesterday, who received a positive rapid test yesterday or who have a new known case in their household.
- Return type
had_event_in_hh (pandas.Series)