diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 741b3ed..0b15320 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.2.8 +current_version = 4.3.0 tag = False commit = True diff --git a/Dockerfile b/Dockerfile index 7123d51..ad820c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,20 @@ -FROM python:3.12-bookworm +FROM python:3.12 +# Set the working directory in the container +WORKDIR /app + +# Copy the requirements file into the container COPY requirements.txt . -RUN pip install -r requirements.txt +# Create a virtual environment +RUN python -m venv /app/venv + +# Upgrade pip and install the dependencies in the virtual environment +RUN /app/venv/bin/pip install --upgrade pip +RUN /app/venv/bin/pip install -r requirements.txt +# Copy the rest of the application code COPY . . + +# Set the entrypoint to use the virtual environment's Python interpreter +CMD ["python3"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 45eb6b6..c78e49a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ -# NOTE The below is the Docker Compose specification version NOT the Python version: -version: "3.8" +version: "3.12" services: rcpchgrowth-python: @@ -9,5 +8,4 @@ services: working_dir: /app tty: true # Allocate a pseudo-TTY stdin_open: true # Keep stdin open - command: | - pytest + container_name: rcpchgrowth-python \ No newline at end of file diff --git a/rcpchgrowth/age_advice_strings.py b/rcpchgrowth/age_advice_strings.py index 425ae99..54074db 100644 --- a/rcpchgrowth/age_advice_strings.py +++ b/rcpchgrowth/age_advice_strings.py @@ -1,4 +1,4 @@ -from rcpchgrowth.constants import CDC +from rcpchgrowth.constants import CDC, WHO def comment_prematurity_correction( chronological_decimal_age: float, @@ -17,7 +17,7 @@ def comment_prematurity_correction( lay_chronological_decimal_age_comment = "Your child was born on their due date." clinician_chronological_decimal_age_comment = "Born Term. No correction has been made for gestation." # These fields should only apply to CDC reference, since UK-WHO corrects for all gestations (and therefore corrected_decimal_age will never be equal to chronological_decimal_age if gestation_weeks is not 40) - if gestation_weeks < 42 and reference == CDC: + if gestation_weeks < 42 and (reference == CDC or reference == WHO): if gestation_weeks < 37: lay_chronological_decimal_age_comment = f"Your child was born at {gestation_weeks}+{gestation_days} weeks gestation. No correction is made for this beyond 2 years of age." clinician_chronological_decimal_age_comment =f"Born preterm at {gestation_weeks}+{gestation_days} weeks gestation. No correction is made for this beyond 2 years of age." diff --git a/rcpchgrowth/chart_functions.py b/rcpchgrowth/chart_functions.py index 4e23b24..017dffd 100644 --- a/rcpchgrowth/chart_functions.py +++ b/rcpchgrowth/chart_functions.py @@ -5,6 +5,7 @@ from .trisomy_21_aap import select_reference_data_for_trisomy_21_aap from .turner import select_reference_data_for_turner from .uk_who import select_reference_data_for_uk_who_chart +from .who import who_reference, select_reference_data_for_who_chart from .constants.reference_constants import ( CDC_REFERENCES, CDC, @@ -25,6 +26,8 @@ TURNERS, UK_WHO, UK_WHO_REFERENCES, + WHO, + WHO_REFERENCES ) """ @@ -70,6 +73,12 @@ def create_chart( sex=sex, centile_format=centile_format, is_sds=is_sds) + elif reference == WHO: + return create_who_chart( + measurement_method=measurement_method, + sex=sex, + centile_format=centile_format, + is_sds=is_sds) else: print("No reference data returned. Is there a spelling mistake in your reference?") @@ -109,7 +118,7 @@ def generate_custom_sds_line( centile=custom_centile ) except: - print("Could not generate centile data.") + print("Could not generate centile data for UK-WHO.") centile_data=[] # all data can now be tagged by reference_name and added to reference_data reference_data.append({reference: centile_data}) @@ -131,7 +140,30 @@ def generate_custom_sds_line( centile=custom_centile ) except: - print(f"Could not generate SDS centile data.") + print(f"Could not generate SDS centile data for {CDC}.") + centile_data=[] + # all data can now be tagged by reference_name and added to reference_data + reference_data.append({reference: centile_data}) + elif reference == WHO: + for reference_index, reference in enumerate(WHO_REFERENCES): + # the centile reference data + lms_array_for_measurement=select_reference_data_for_who_chart( + who_reference_name=reference, + measurement_method=measurement_method, + sex=sex + ) + centile_data=[] + try: + centile_data= build_centile_object( + reference=WHO, + measurement_method=measurement_method, + sex=sex, + lms_array_for_measurement=lms_array_for_measurement, + z=custom_sds, + centile=custom_centile + ) + except: + print(f"Could not generate SDS centile data for WHO.") centile_data=[] # all data can now be tagged by reference_name and added to reference_data reference_data.append({reference: centile_data}) @@ -219,6 +251,8 @@ def select_reference_lms_data(reference: str, measurement_method: str, sex: str) lms_array_for_measurement=select_reference_data_for_trisomy_21(measurement_method=measurement_method, sex=sex) elif reference == CDC: lms_array_for_measurement=select_reference_data_for_cdc_chart(measurement_method=measurement_method, sex=sex) + elif reference == WHO: + lms_array_for_measurement=select_reference_data_for_who_chart(measurement_method=measurement_method, sex=sex) else: raise Exception("No data has been selected!") @@ -907,7 +941,163 @@ def create_trisomy_21_aap_chart(measurement_method: str, sex: str, centile_forma ] """ -# Private functions +def create_who_chart( + measurement_method: str, + sex: str, + centile_format: Union[str, list] = COLE_TWO_THIRDS_SDS_NINE_CENTILES, + is_sds = False + ): + + # user selects which centile collection they want, for sex and measurement_method + # If the Cole method is selected, conversion between centile and SDS + # is different as SDS is rounded to the nearest 2/3 + # Cole method selection is stored in the cole_method flag. + # If no parameter is passed, default is the Cole method + # Alternatively it is possible to pass a custom list of values - if the is_sds flag is False (default) these are centiles + + centile_sds_collection = [] + cole_method = False + + if (type(centile_format) is list): + # a custom list of centiles was provided + centile_sds_collection = centile_format + else: + # a standard centile collection was selected + centile_sds_collection = select_centile_format(centile_format) + is_sds=False + + ## + # iterate through the 3 references that make up CDC (Fenton, WHO, CDC itself) + # There will be a list for each one + ## + + # all data for a given reference are stored here: this is returned to the user + reference_data = [] + + for reference_index, reference_name in enumerate(WHO_REFERENCES): + sex_list: dict = {} # all the data for a given sex are stored here + # For each reference we have 2 sexes + # for sex_index, sex in enumerate(SEXES): + # For each sex we have 4 measurement_methods + + measurements: dict = {} # all the data for a given measurement_method are stored here + + # for measurement_index, measurement_method in enumerate(MEASUREMENT_METHODS): + # for every measurement method we have as many centiles + # as have been requested + + centiles = [] # all generated centiles for a selected centile collection are stored here + + default_youngest_reference = False + if reference_index == 1: # WHO children + default_youngest_reference = True + + # the centile reference data + try: + lms_array_for_measurement=select_reference_data_for_who_chart( + who_reference_name=reference_name, + measurement_method=measurement_method, + sex=sex, + default_youngest_reference=default_youngest_reference) + except: + lms_array_for_measurement = [] + + for centile_index, centile_sds in enumerate(centile_sds_collection): + # we must create a z for each requested centile + # if the Cole 9 centiles were selected, these are rounded, + # so conversion to SDS is different + # Otherwise standard conversation of centile to z is used + + z=0.0 #initialise + centile_value=0.0 #initialise + + if cole_method: + z = rounded_sds_for_centile(centile_sds) # a centile was provided, so convert to z + centile_value=centile_sds # store the original centile value + else: + if (is_sds): + z=centile_sds # an sds was supplied + centile_value=centile(centile_sds) # convert the z to a centile and store + else: + z = sds_for_centile(centile_sds) # a centile was provided, so convert to z + centile_value=centile_sds # store the original centile value + centile_data = [] + + try: + # Generate a centile. there will be nine of these if Cole method selected. + # Some data does not exist at all ages, so any error reflects missing data. + # If this happens, an empty list is returned. + centile_data = generate_centile( + z=z, + centile=centile_value, + measurement_method=measurement_method, + sex=sex, + lms_array_for_measurement=lms_array_for_measurement, + reference=WHO, + is_sds=is_sds, + default_youngest_reference=default_youngest_reference + ) + except LookupError as e: + print(f"Not possible to generate centile data for WHO {measurement_method} in {sex}s. {e}") + centile_data=None + # Store this centile for a given measurement + + centiles.append({"sds": round(z * 100) / 100, + "centile": centile_value, "data": centile_data}) + + # this is the end of the centile_collection for loop + # All the centiles for this measurement, sex and reference are added to the measurements list + measurements.update({measurement_method: centiles}) + + # this is the end of the measurement_methods loop + # All data for all measurement_methods for this sex are added to the sex_list list + + sex_list.update({sex: measurements}) + + # all data can now be tagged by reference_name and added to reference_data + reference_data.append({reference_name: sex_list}) + + # returns a list of 4 references, each containing 2 lists for each sex, + # each sex in turn containing 4 datasets for each measurement_method + return reference_data + + """ + # return object structure + [ cdc_infant: { + male: { + height: [ + { + sds: -2.667, + centile: 0.4 + data: [{l: , x: , y: }, ....] + } + ], + weight: [...], + bmi: [...], + ofc: [...] + }, + female {...} + }, + cdc_child: { + male: { + height: [ + { + sds: -2.667, + centile: 0.4 + data: [{l: , x: , y: }, ....] + } + ], + weight: [...], + bmi: [...], + ofc: [...] + }, + female {...} + } + ] + """ + + + def select_centile_format(centile_format: str): """ Select the centile format diff --git a/rcpchgrowth/constants/age_constants.py b/rcpchgrowth/constants/age_constants.py index 0095471..6c5f774 100644 --- a/rcpchgrowth/constants/age_constants.py +++ b/rcpchgrowth/constants/age_constants.py @@ -7,10 +7,14 @@ FORTY_TWO_WEEKS_GESTATION = ((42 * 7) - (40 * 7)) / 365.25 # 42 weeks as decimal age TWENTY_THREE_WEEKS_GESTATION = ((23 * 7) - (40 * 7)) / 365.25 # 23 weeks as decimal age FIFTY_WEEKS_GESTATION = ((50 * 7) - (40 * 7)) / 365.25 # 50 weeks as decimal age +ZERO_YEARS = 0.0 TWO_YEARS = 2.0 THREE_YEARS = 3.0 +FIVE_YEARS = 5.0 +TEN_YEARS = 10.0 SEVENTEEN_YEARS = 17.0 EIGHTEEN_YEARS = 18.0 +NINETEEN_YEARS = 19.0 TWENTY_YEARS = 20.0 TERM_WEEKS = 40 LOWER_THRESHOLD_PRETERM_REFERENCE_WEEKS = 23 diff --git a/rcpchgrowth/constants/reference_constants.py b/rcpchgrowth/constants/reference_constants.py index 6c79e1a..cda48ff 100644 --- a/rcpchgrowth/constants/reference_constants.py +++ b/rcpchgrowth/constants/reference_constants.py @@ -27,6 +27,18 @@ FENTON = "fenton" # Fenton is the reference name for preterm infants CDC_REFERENCES = [FENTON, CDC_INFANT, CDC_CHILD] # CDC references +# WHO constants +WHO = "who" # WHO is the overarching reference +WHO_2006_INFANT = "who_2006_infant" # WHO 2006 infant is the reference name for children 0-2 years +WHO_2006_CHILD = "who_2006_child" # WHO 2006 child is the reference name for children 2-5 years +WHO_2007_CHILD = "who_2007_child" # WHO 2007 child is the reference name for children 5-19 years +WHO_REFERENCES = [WHO_2006_INFANT, WHO_2006_CHILD, WHO_2007_CHILD] # WHO references + +WHO_2006_REFERENCE_LOWER_THRESHOLD = ((42 * 7) - (40 * 7)) / 365.25 # 42 weeks as decimal age # 2 weeks as decimal age +WHO_2006_REFERENCE_UPPER_THRESHOLD = 5.0 # 5 years as decimal age +WHO_2007_REFERENCE_LOWER_THRESHOLD = 5.0 # 5 years as decimal age +WHO_2007_REFERENCE_UPPER_THRESHOLD = 19.0 # 19 years as decimal age + # 23 weeks is the lowest decimal age available on the UK90 charts UK90_REFERENCE_LOWER_THRESHOLD = ( (23 * 7) - (40 * 7) @@ -64,7 +76,7 @@ WEIGHT = "weight" HEAD_CIRCUMFERENCE = "ofc" BMI = "bmi" -REFERENCES = [UK_WHO, TRISOMY_21, TURNERS] +REFERENCES = [UK_WHO, TRISOMY_21, TRISOMY_21_AAP, TURNERS, CDC, WHO] SEXES = [MALE, FEMALE] MEASUREMENT_METHODS = [HEIGHT, WEIGHT, HEAD_CIRCUMFERENCE, BMI] diff --git a/rcpchgrowth/data_tables/who_2007_children.json b/rcpchgrowth/data_tables/who_2007_children.json new file mode 100644 index 0000000..b9b8a66 --- /dev/null +++ b/rcpchgrowth/data_tables/who_2007_children.json @@ -0,0 +1,4614 @@ +{ + "acknowledgement_text": "WHO 5-19 Reference (2007)", + "notes": "", + "filename": "WHO_2007_children", + "measurement": { + "height": { + "male": + [ + { + "decimal_age": 5.08, + "L": 1, + "M": 110.2647, + "S": 0.04164 + }, + { + "decimal_age": 5.17, + "L": 1, + "M": 110.8006, + "S": 0.04172 + }, + { + "decimal_age": 5.25, + "L": 1, + "M": 111.3338, + "S": 0.0418 + }, + { + "decimal_age": 5.33, + "L": 1, + "M": 111.8636, + "S": 0.04187 + }, + { + "decimal_age": 5.42, + "L": 1, + "M": 112.3895, + "S": 0.04195 + }, + { + "decimal_age": 5.5, + "L": 1, + "M": 112.911, + "S": 0.04203 + }, + { + "decimal_age": 5.58, + "L": 1, + "M": 113.428, + "S": 0.04211 + }, + { + "decimal_age": 5.67, + "L": 1, + "M": 113.941, + "S": 0.04218 + }, + { + "decimal_age": 5.75, + "L": 1, + "M": 114.45, + "S": 0.04226 + }, + { + "decimal_age": 5.83, + "L": 1, + "M": 114.9547, + "S": 0.04234 + }, + { + "decimal_age": 5.92, + "L": 1, + "M": 115.4549, + "S": 0.04241 + }, + { + "decimal_age": 6, + "L": 1, + "M": 115.9509, + "S": 0.04249 + }, + { + "decimal_age": 6.08, + "L": 1, + "M": 116.4432, + "S": 0.04257 + }, + { + "decimal_age": 6.17, + "L": 1, + "M": 116.9325, + "S": 0.04264 + }, + { + "decimal_age": 6.25, + "L": 1, + "M": 117.4196, + "S": 0.04272 + }, + { + "decimal_age": 6.33, + "L": 1, + "M": 117.9046, + "S": 0.0428 + }, + { + "decimal_age": 6.42, + "L": 1, + "M": 118.388, + "S": 0.04287 + }, + { + "decimal_age": 6.5, + "L": 1, + "M": 118.87, + "S": 0.04295 + }, + { + "decimal_age": 6.58, + "L": 1, + "M": 119.3508, + "S": 0.04303 + }, + { + "decimal_age": 6.67, + "L": 1, + "M": 119.8303, + "S": 0.04311 + }, + { + "decimal_age": 6.75, + "L": 1, + "M": 120.3085, + "S": 0.04318 + }, + { + "decimal_age": 6.83, + "L": 1, + "M": 120.7853, + "S": 0.04326 + }, + { + "decimal_age": 6.92, + "L": 1, + "M": 121.2604, + "S": 0.04334 + }, + { + "decimal_age": 7, + "L": 1, + "M": 121.7338, + "S": 0.04342 + }, + { + "decimal_age": 7.08, + "L": 1, + "M": 122.2053, + "S": 0.0435 + }, + { + "decimal_age": 7.17, + "L": 1, + "M": 122.675, + "S": 0.04358 + }, + { + "decimal_age": 7.25, + "L": 1, + "M": 123.1429, + "S": 0.04366 + }, + { + "decimal_age": 7.33, + "L": 1, + "M": 123.6092, + "S": 0.04374 + }, + { + "decimal_age": 7.42, + "L": 1, + "M": 124.0736, + "S": 0.04382 + }, + { + "decimal_age": 7.5, + "L": 1, + "M": 124.5361, + "S": 0.0439 + }, + { + "decimal_age": 7.58, + "L": 1, + "M": 124.9964, + "S": 0.04398 + }, + { + "decimal_age": 7.67, + "L": 1, + "M": 125.4545, + "S": 0.04406 + }, + { + "decimal_age": 7.75, + "L": 1, + "M": 125.9104, + "S": 0.04414 + }, + { + "decimal_age": 7.83, + "L": 1, + "M": 126.364, + "S": 0.04422 + }, + { + "decimal_age": 7.92, + "L": 1, + "M": 126.8156, + "S": 0.0443 + }, + { + "decimal_age": 8, + "L": 1, + "M": 127.2651, + "S": 0.04438 + }, + { + "decimal_age": 8.08, + "L": 1, + "M": 127.7129, + "S": 0.04446 + }, + { + "decimal_age": 8.17, + "L": 1, + "M": 128.159, + "S": 0.04454 + }, + { + "decimal_age": 8.25, + "L": 1, + "M": 128.6034, + "S": 0.04462 + }, + { + "decimal_age": 8.33, + "L": 1, + "M": 129.0466, + "S": 0.0447 + }, + { + "decimal_age": 8.42, + "L": 1, + "M": 129.4887, + "S": 0.04478 + }, + { + "decimal_age": 8.5, + "L": 1, + "M": 129.93, + "S": 0.04487 + }, + { + "decimal_age": 8.58, + "L": 1, + "M": 130.3705, + "S": 0.04495 + }, + { + "decimal_age": 8.67, + "L": 1, + "M": 130.8103, + "S": 0.04503 + }, + { + "decimal_age": 8.75, + "L": 1, + "M": 131.2495, + "S": 0.04511 + }, + { + "decimal_age": 8.83, + "L": 1, + "M": 131.6884, + "S": 0.04519 + }, + { + "decimal_age": 8.92, + "L": 1, + "M": 132.1269, + "S": 0.04527 + }, + { + "decimal_age": 9, + "L": 1, + "M": 132.5652, + "S": 0.04535 + }, + { + "decimal_age": 9.08, + "L": 1, + "M": 133.0031, + "S": 0.04543 + }, + { + "decimal_age": 9.17, + "L": 1, + "M": 133.4404, + "S": 0.04551 + }, + { + "decimal_age": 9.25, + "L": 1, + "M": 133.877, + "S": 0.04559 + }, + { + "decimal_age": 9.33, + "L": 1, + "M": 134.313, + "S": 0.04566 + }, + { + "decimal_age": 9.42, + "L": 1, + "M": 134.7483, + "S": 0.04574 + }, + { + "decimal_age": 9.5, + "L": 1, + "M": 135.1829, + "S": 0.04582 + }, + { + "decimal_age": 9.58, + "L": 1, + "M": 135.6168, + "S": 0.04589 + }, + { + "decimal_age": 9.67, + "L": 1, + "M": 136.0501, + "S": 0.04597 + }, + { + "decimal_age": 9.75, + "L": 1, + "M": 136.4829, + "S": 0.04604 + }, + { + "decimal_age": 9.83, + "L": 1, + "M": 136.9153, + "S": 0.04612 + }, + { + "decimal_age": 9.92, + "L": 1, + "M": 137.3474, + "S": 0.04619 + }, + { + "decimal_age": 10, + "L": 1, + "M": 137.7795, + "S": 0.04626 + }, + { + "decimal_age": 10.08, + "L": 1, + "M": 138.2119, + "S": 0.04633 + }, + { + "decimal_age": 10.17, + "L": 1, + "M": 138.6452, + "S": 0.0464 + }, + { + "decimal_age": 10.25, + "L": 1, + "M": 139.0797, + "S": 0.04647 + }, + { + "decimal_age": 10.33, + "L": 1, + "M": 139.5158, + "S": 0.04654 + }, + { + "decimal_age": 10.42, + "L": 1, + "M": 139.954, + "S": 0.04661 + }, + { + "decimal_age": 10.5, + "L": 1, + "M": 140.3948, + "S": 0.04667 + }, + { + "decimal_age": 10.58, + "L": 1, + "M": 140.8387, + "S": 0.04674 + }, + { + "decimal_age": 10.67, + "L": 1, + "M": 141.2859, + "S": 0.0468 + }, + { + "decimal_age": 10.75, + "L": 1, + "M": 141.7368, + "S": 0.04686 + }, + { + "decimal_age": 10.83, + "L": 1, + "M": 142.1916, + "S": 0.04692 + }, + { + "decimal_age": 10.92, + "L": 1, + "M": 142.6501, + "S": 0.04698 + }, + { + "decimal_age": 11, + "L": 1, + "M": 143.1126, + "S": 0.04703 + }, + { + "decimal_age": 11.08, + "L": 1, + "M": 143.5795, + "S": 0.04709 + }, + { + "decimal_age": 11.17, + "L": 1, + "M": 144.0511, + "S": 0.04714 + }, + { + "decimal_age": 11.25, + "L": 1, + "M": 144.5276, + "S": 0.04719 + }, + { + "decimal_age": 11.33, + "L": 1, + "M": 145.0093, + "S": 0.04723 + }, + { + "decimal_age": 11.42, + "L": 1, + "M": 145.4964, + "S": 0.04728 + }, + { + "decimal_age": 11.5, + "L": 1, + "M": 145.9891, + "S": 0.04732 + }, + { + "decimal_age": 11.58, + "L": 1, + "M": 146.4878, + "S": 0.04736 + }, + { + "decimal_age": 11.67, + "L": 1, + "M": 146.9927, + "S": 0.0474 + }, + { + "decimal_age": 11.75, + "L": 1, + "M": 147.5041, + "S": 0.04744 + }, + { + "decimal_age": 11.83, + "L": 1, + "M": 148.0224, + "S": 0.04747 + }, + { + "decimal_age": 11.92, + "L": 1, + "M": 148.5478, + "S": 0.0475 + }, + { + "decimal_age": 12, + "L": 1, + "M": 149.0807, + "S": 0.04753 + }, + { + "decimal_age": 12.08, + "L": 1, + "M": 149.6212, + "S": 0.04755 + }, + { + "decimal_age": 12.17, + "L": 1, + "M": 150.1694, + "S": 0.04758 + }, + { + "decimal_age": 12.25, + "L": 1, + "M": 150.7256, + "S": 0.04759 + }, + { + "decimal_age": 12.33, + "L": 1, + "M": 151.2899, + "S": 0.04761 + }, + { + "decimal_age": 12.42, + "L": 1, + "M": 151.8623, + "S": 0.04762 + }, + { + "decimal_age": 12.5, + "L": 1, + "M": 152.4425, + "S": 0.04763 + }, + { + "decimal_age": 12.58, + "L": 1, + "M": 153.0298, + "S": 0.04763 + }, + { + "decimal_age": 12.67, + "L": 1, + "M": 153.6234, + "S": 0.04764 + }, + { + "decimal_age": 12.75, + "L": 1, + "M": 154.2223, + "S": 0.04763 + }, + { + "decimal_age": 12.83, + "L": 1, + "M": 154.8258, + "S": 0.04763 + }, + { + "decimal_age": 12.92, + "L": 1, + "M": 155.4329, + "S": 0.04762 + }, + { + "decimal_age": 13, + "L": 1, + "M": 156.0426, + "S": 0.0476 + }, + { + "decimal_age": 13.08, + "L": 1, + "M": 156.6539, + "S": 0.04758 + }, + { + "decimal_age": 13.17, + "L": 1, + "M": 157.266, + "S": 0.04756 + }, + { + "decimal_age": 13.25, + "L": 1, + "M": 157.8775, + "S": 0.04754 + }, + { + "decimal_age": 13.33, + "L": 1, + "M": 158.4871, + "S": 0.04751 + }, + { + "decimal_age": 13.42, + "L": 1, + "M": 159.0937, + "S": 0.04747 + }, + { + "decimal_age": 13.5, + "L": 1, + "M": 159.6962, + "S": 0.04744 + }, + { + "decimal_age": 13.58, + "L": 1, + "M": 160.2939, + "S": 0.0474 + }, + { + "decimal_age": 13.67, + "L": 1, + "M": 160.8861, + "S": 0.04735 + }, + { + "decimal_age": 13.75, + "L": 1, + "M": 161.472, + "S": 0.0473 + }, + { + "decimal_age": 13.83, + "L": 1, + "M": 162.0505, + "S": 0.04725 + }, + { + "decimal_age": 13.92, + "L": 1, + "M": 162.6207, + "S": 0.0472 + }, + { + "decimal_age": 14, + "L": 1, + "M": 163.1816, + "S": 0.04714 + }, + { + "decimal_age": 14.08, + "L": 1, + "M": 163.7321, + "S": 0.04707 + }, + { + "decimal_age": 14.17, + "L": 1, + "M": 164.2717, + "S": 0.04701 + }, + { + "decimal_age": 14.25, + "L": 1, + "M": 164.7994, + "S": 0.04694 + }, + { + "decimal_age": 14.33, + "L": 1, + "M": 165.3145, + "S": 0.04687 + }, + { + "decimal_age": 14.42, + "L": 1, + "M": 165.8165, + "S": 0.04679 + }, + { + "decimal_age": 14.5, + "L": 1, + "M": 166.305, + "S": 0.04671 + }, + { + "decimal_age": 14.58, + "L": 1, + "M": 166.7799, + "S": 0.04663 + }, + { + "decimal_age": 14.67, + "L": 1, + "M": 167.2415, + "S": 0.04655 + }, + { + "decimal_age": 14.75, + "L": 1, + "M": 167.6899, + "S": 0.04646 + }, + { + "decimal_age": 14.83, + "L": 1, + "M": 168.1255, + "S": 0.04637 + }, + { + "decimal_age": 14.92, + "L": 1, + "M": 168.5482, + "S": 0.04628 + }, + { + "decimal_age": 15, + "L": 1, + "M": 168.958, + "S": 0.04619 + }, + { + "decimal_age": 15.08, + "L": 1, + "M": 169.3549, + "S": 0.04609 + }, + { + "decimal_age": 15.17, + "L": 1, + "M": 169.7389, + "S": 0.04599 + }, + { + "decimal_age": 15.25, + "L": 1, + "M": 170.1099, + "S": 0.04589 + }, + { + "decimal_age": 15.33, + "L": 1, + "M": 170.468, + "S": 0.04579 + }, + { + "decimal_age": 15.42, + "L": 1, + "M": 170.8136, + "S": 0.04569 + }, + { + "decimal_age": 15.5, + "L": 1, + "M": 171.1468, + "S": 0.04559 + }, + { + "decimal_age": 15.58, + "L": 1, + "M": 171.468, + "S": 0.04548 + }, + { + "decimal_age": 15.67, + "L": 1, + "M": 171.7773, + "S": 0.04538 + }, + { + "decimal_age": 15.75, + "L": 1, + "M": 172.0748, + "S": 0.04527 + }, + { + "decimal_age": 15.83, + "L": 1, + "M": 172.3606, + "S": 0.04516 + }, + { + "decimal_age": 15.92, + "L": 1, + "M": 172.6345, + "S": 0.04506 + }, + { + "decimal_age": 16, + "L": 1, + "M": 172.8967, + "S": 0.04495 + }, + { + "decimal_age": 16.08, + "L": 1, + "M": 173.147, + "S": 0.04484 + }, + { + "decimal_age": 16.17, + "L": 1, + "M": 173.3856, + "S": 0.04473 + }, + { + "decimal_age": 16.25, + "L": 1, + "M": 173.6126, + "S": 0.04462 + }, + { + "decimal_age": 16.33, + "L": 1, + "M": 173.828, + "S": 0.04451 + }, + { + "decimal_age": 16.42, + "L": 1, + "M": 174.0321, + "S": 0.0444 + }, + { + "decimal_age": 16.5, + "L": 1, + "M": 174.2251, + "S": 0.04429 + }, + { + "decimal_age": 16.58, + "L": 1, + "M": 174.4071, + "S": 0.04418 + }, + { + "decimal_age": 16.67, + "L": 1, + "M": 174.5784, + "S": 0.04407 + }, + { + "decimal_age": 16.75, + "L": 1, + "M": 174.7392, + "S": 0.04396 + }, + { + "decimal_age": 16.83, + "L": 1, + "M": 174.8896, + "S": 0.04385 + }, + { + "decimal_age": 16.92, + "L": 1, + "M": 175.0301, + "S": 0.04375 + }, + { + "decimal_age": 17, + "L": 1, + "M": 175.1609, + "S": 0.04364 + }, + { + "decimal_age": 17.08, + "L": 1, + "M": 175.2824, + "S": 0.04353 + }, + { + "decimal_age": 17.17, + "L": 1, + "M": 175.3951, + "S": 0.04343 + }, + { + "decimal_age": 17.25, + "L": 1, + "M": 175.4995, + "S": 0.04332 + }, + { + "decimal_age": 17.33, + "L": 1, + "M": 175.5959, + "S": 0.04322 + }, + { + "decimal_age": 17.42, + "L": 1, + "M": 175.685, + "S": 0.04311 + }, + { + "decimal_age": 17.5, + "L": 1, + "M": 175.7672, + "S": 0.04301 + }, + { + "decimal_age": 17.58, + "L": 1, + "M": 175.8432, + "S": 0.04291 + }, + { + "decimal_age": 17.67, + "L": 1, + "M": 175.9133, + "S": 0.04281 + }, + { + "decimal_age": 17.75, + "L": 1, + "M": 175.9781, + "S": 0.04271 + }, + { + "decimal_age": 17.83, + "L": 1, + "M": 176.038, + "S": 0.04261 + }, + { + "decimal_age": 17.92, + "L": 1, + "M": 176.0935, + "S": 0.04251 + }, + { + "decimal_age": 18, + "L": 1, + "M": 176.1449, + "S": 0.04241 + }, + { + "decimal_age": 18.08, + "L": 1, + "M": 176.1925, + "S": 0.04232 + }, + { + "decimal_age": 18.17, + "L": 1, + "M": 176.2368, + "S": 0.04222 + }, + { + "decimal_age": 18.25, + "L": 1, + "M": 176.2779, + "S": 0.04213 + }, + { + "decimal_age": 18.33, + "L": 1, + "M": 176.3162, + "S": 0.04204 + }, + { + "decimal_age": 18.42, + "L": 1, + "M": 176.3518, + "S": 0.04195 + }, + { + "decimal_age": 18.5, + "L": 1, + "M": 176.3851, + "S": 0.04185 + }, + { + "decimal_age": 18.58, + "L": 1, + "M": 176.4162, + "S": 0.04177 + }, + { + "decimal_age": 18.67, + "L": 1, + "M": 176.4453, + "S": 0.04168 + }, + { + "decimal_age": 18.75, + "L": 1, + "M": 176.4724, + "S": 0.04159 + }, + { + "decimal_age": 18.83, + "L": 1, + "M": 176.4976, + "S": 0.0415 + }, + { + "decimal_age": 18.92, + "L": 1, + "M": 176.5211, + "S": 0.04142 + }, + { + "decimal_age": 19, + "L": 1, + "M": 176.5432, + "S": 0.04134 + } + ], + "female":[ + { + "decimal_age": 5.08, + "L": 1, + "M": 109.6016, + "S": 0.04355 + }, + { + "decimal_age": 5.17, + "L": 1, + "M": 110.1258, + "S": 0.04364 + }, + { + "decimal_age": 5.25, + "L": 1, + "M": 110.6451, + "S": 0.04373 + }, + { + "decimal_age": 5.33, + "L": 1, + "M": 111.1596, + "S": 0.04382 + }, + { + "decimal_age": 5.42, + "L": 1, + "M": 111.6696, + "S": 0.0439 + }, + { + "decimal_age": 5.5, + "L": 1, + "M": 112.1753, + "S": 0.04399 + }, + { + "decimal_age": 5.58, + "L": 1, + "M": 112.6767, + "S": 0.04407 + }, + { + "decimal_age": 5.67, + "L": 1, + "M": 113.174, + "S": 0.04415 + }, + { + "decimal_age": 5.75, + "L": 1, + "M": 113.6672, + "S": 0.04423 + }, + { + "decimal_age": 5.83, + "L": 1, + "M": 114.1565, + "S": 0.04431 + }, + { + "decimal_age": 5.92, + "L": 1, + "M": 114.6421, + "S": 0.04439 + }, + { + "decimal_age": 6, + "L": 1, + "M": 115.1244, + "S": 0.04447 + }, + { + "decimal_age": 6.08, + "L": 1, + "M": 115.6039, + "S": 0.04454 + }, + { + "decimal_age": 6.17, + "L": 1, + "M": 116.0812, + "S": 0.04461 + }, + { + "decimal_age": 6.25, + "L": 1, + "M": 116.5568, + "S": 0.04469 + }, + { + "decimal_age": 6.33, + "L": 1, + "M": 117.0311, + "S": 0.04475 + }, + { + "decimal_age": 6.42, + "L": 1, + "M": 117.5044, + "S": 0.04482 + }, + { + "decimal_age": 6.5, + "L": 1, + "M": 117.9769, + "S": 0.04489 + }, + { + "decimal_age": 6.58, + "L": 1, + "M": 118.4489, + "S": 0.04495 + }, + { + "decimal_age": 6.67, + "L": 1, + "M": 118.9208, + "S": 0.04502 + }, + { + "decimal_age": 6.75, + "L": 1, + "M": 119.3926, + "S": 0.04508 + }, + { + "decimal_age": 6.83, + "L": 1, + "M": 119.8648, + "S": 0.04514 + }, + { + "decimal_age": 6.92, + "L": 1, + "M": 120.3374, + "S": 0.0452 + }, + { + "decimal_age": 7, + "L": 1, + "M": 120.8105, + "S": 0.04525 + }, + { + "decimal_age": 7.08, + "L": 1, + "M": 121.2843, + "S": 0.04531 + }, + { + "decimal_age": 7.17, + "L": 1, + "M": 121.7587, + "S": 0.04536 + }, + { + "decimal_age": 7.25, + "L": 1, + "M": 122.2338, + "S": 0.04542 + }, + { + "decimal_age": 7.33, + "L": 1, + "M": 122.7098, + "S": 0.04547 + }, + { + "decimal_age": 7.42, + "L": 1, + "M": 123.1868, + "S": 0.04551 + }, + { + "decimal_age": 7.5, + "L": 1, + "M": 123.6646, + "S": 0.04556 + }, + { + "decimal_age": 7.58, + "L": 1, + "M": 124.1435, + "S": 0.04561 + }, + { + "decimal_age": 7.67, + "L": 1, + "M": 124.6234, + "S": 0.04565 + }, + { + "decimal_age": 7.75, + "L": 1, + "M": 125.1045, + "S": 0.04569 + }, + { + "decimal_age": 7.83, + "L": 1, + "M": 125.5869, + "S": 0.04573 + }, + { + "decimal_age": 7.92, + "L": 1, + "M": 126.0706, + "S": 0.04577 + }, + { + "decimal_age": 8, + "L": 1, + "M": 126.5558, + "S": 0.04581 + }, + { + "decimal_age": 8.08, + "L": 1, + "M": 127.0424, + "S": 0.04585 + }, + { + "decimal_age": 8.17, + "L": 1, + "M": 127.5304, + "S": 0.04588 + }, + { + "decimal_age": 8.25, + "L": 1, + "M": 128.0199, + "S": 0.04591 + }, + { + "decimal_age": 8.33, + "L": 1, + "M": 128.5109, + "S": 0.04594 + }, + { + "decimal_age": 8.42, + "L": 1, + "M": 129.0035, + "S": 0.04597 + }, + { + "decimal_age": 8.5, + "L": 1, + "M": 129.4975, + "S": 0.046 + }, + { + "decimal_age": 8.58, + "L": 1, + "M": 129.9932, + "S": 0.04602 + }, + { + "decimal_age": 8.67, + "L": 1, + "M": 130.4904, + "S": 0.04604 + }, + { + "decimal_age": 8.75, + "L": 1, + "M": 130.9891, + "S": 0.04607 + }, + { + "decimal_age": 8.83, + "L": 1, + "M": 131.4895, + "S": 0.04608 + }, + { + "decimal_age": 8.92, + "L": 1, + "M": 131.9912, + "S": 0.0461 + }, + { + "decimal_age": 9, + "L": 1, + "M": 132.4944, + "S": 0.04612 + }, + { + "decimal_age": 9.08, + "L": 1, + "M": 132.9989, + "S": 0.04613 + }, + { + "decimal_age": 9.17, + "L": 1, + "M": 133.5046, + "S": 0.04614 + }, + { + "decimal_age": 9.25, + "L": 1, + "M": 134.0118, + "S": 0.04615 + }, + { + "decimal_age": 9.33, + "L": 1, + "M": 134.5202, + "S": 0.04616 + }, + { + "decimal_age": 9.42, + "L": 1, + "M": 135.0299, + "S": 0.04616 + }, + { + "decimal_age": 9.5, + "L": 1, + "M": 135.541, + "S": 0.04617 + }, + { + "decimal_age": 9.58, + "L": 1, + "M": 136.0533, + "S": 0.04617 + }, + { + "decimal_age": 9.67, + "L": 1, + "M": 136.567, + "S": 0.04616 + }, + { + "decimal_age": 9.75, + "L": 1, + "M": 137.0821, + "S": 0.04616 + }, + { + "decimal_age": 9.83, + "L": 1, + "M": 137.5987, + "S": 0.04616 + }, + { + "decimal_age": 9.92, + "L": 1, + "M": 138.1167, + "S": 0.04615 + }, + { + "decimal_age": 10, + "L": 1, + "M": 138.6363, + "S": 0.04614 + }, + { + "decimal_age": 10.08, + "L": 1, + "M": 139.1575, + "S": 0.04612 + }, + { + "decimal_age": 10.17, + "L": 1, + "M": 139.6803, + "S": 0.04611 + }, + { + "decimal_age": 10.25, + "L": 1, + "M": 140.2049, + "S": 0.04609 + }, + { + "decimal_age": 10.33, + "L": 1, + "M": 140.7313, + "S": 0.04607 + }, + { + "decimal_age": 10.42, + "L": 1, + "M": 141.2594, + "S": 0.04605 + }, + { + "decimal_age": 10.5, + "L": 1, + "M": 141.7892, + "S": 0.04603 + }, + { + "decimal_age": 10.58, + "L": 1, + "M": 142.3206, + "S": 0.046 + }, + { + "decimal_age": 10.67, + "L": 1, + "M": 142.8534, + "S": 0.04597 + }, + { + "decimal_age": 10.75, + "L": 1, + "M": 143.3874, + "S": 0.04594 + }, + { + "decimal_age": 10.83, + "L": 1, + "M": 143.9222, + "S": 0.04591 + }, + { + "decimal_age": 10.92, + "L": 1, + "M": 144.4575, + "S": 0.04588 + }, + { + "decimal_age": 11, + "L": 1, + "M": 144.9929, + "S": 0.04584 + }, + { + "decimal_age": 11.08, + "L": 1, + "M": 145.528, + "S": 0.0458 + }, + { + "decimal_age": 11.17, + "L": 1, + "M": 146.0622, + "S": 0.04576 + }, + { + "decimal_age": 11.25, + "L": 1, + "M": 146.5951, + "S": 0.04571 + }, + { + "decimal_age": 11.33, + "L": 1, + "M": 147.1262, + "S": 0.04567 + }, + { + "decimal_age": 11.42, + "L": 1, + "M": 147.6548, + "S": 0.04562 + }, + { + "decimal_age": 11.5, + "L": 1, + "M": 148.1804, + "S": 0.04557 + }, + { + "decimal_age": 11.58, + "L": 1, + "M": 148.7023, + "S": 0.04552 + }, + { + "decimal_age": 11.67, + "L": 1, + "M": 149.2197, + "S": 0.04546 + }, + { + "decimal_age": 11.75, + "L": 1, + "M": 149.7322, + "S": 0.04541 + }, + { + "decimal_age": 11.83, + "L": 1, + "M": 150.239, + "S": 0.04535 + }, + { + "decimal_age": 11.92, + "L": 1, + "M": 150.7394, + "S": 0.04529 + }, + { + "decimal_age": 12, + "L": 1, + "M": 151.2327, + "S": 0.04523 + }, + { + "decimal_age": 12.08, + "L": 1, + "M": 151.7182, + "S": 0.04516 + }, + { + "decimal_age": 12.17, + "L": 1, + "M": 152.1951, + "S": 0.0451 + }, + { + "decimal_age": 12.25, + "L": 1, + "M": 152.6628, + "S": 0.04503 + }, + { + "decimal_age": 12.33, + "L": 1, + "M": 153.1206, + "S": 0.04497 + }, + { + "decimal_age": 12.42, + "L": 1, + "M": 153.5678, + "S": 0.0449 + }, + { + "decimal_age": 12.5, + "L": 1, + "M": 154.0041, + "S": 0.04483 + }, + { + "decimal_age": 12.58, + "L": 1, + "M": 154.429, + "S": 0.04476 + }, + { + "decimal_age": 12.67, + "L": 1, + "M": 154.8423, + "S": 0.04468 + }, + { + "decimal_age": 12.75, + "L": 1, + "M": 155.2437, + "S": 0.04461 + }, + { + "decimal_age": 12.83, + "L": 1, + "M": 155.633, + "S": 0.04454 + }, + { + "decimal_age": 12.92, + "L": 1, + "M": 156.0101, + "S": 0.04446 + }, + { + "decimal_age": 13, + "L": 1, + "M": 156.3748, + "S": 0.04439 + }, + { + "decimal_age": 13.08, + "L": 1, + "M": 156.7269, + "S": 0.04431 + }, + { + "decimal_age": 13.17, + "L": 1, + "M": 157.0666, + "S": 0.04423 + }, + { + "decimal_age": 13.25, + "L": 1, + "M": 157.3936, + "S": 0.04415 + }, + { + "decimal_age": 13.33, + "L": 1, + "M": 157.7082, + "S": 0.04408 + }, + { + "decimal_age": 13.42, + "L": 1, + "M": 158.0102, + "S": 0.044 + }, + { + "decimal_age": 13.5, + "L": 1, + "M": 158.2997, + "S": 0.04392 + }, + { + "decimal_age": 13.58, + "L": 1, + "M": 158.5771, + "S": 0.04384 + }, + { + "decimal_age": 13.67, + "L": 1, + "M": 158.8425, + "S": 0.04376 + }, + { + "decimal_age": 13.75, + "L": 1, + "M": 159.0961, + "S": 0.04369 + }, + { + "decimal_age": 13.83, + "L": 1, + "M": 159.3382, + "S": 0.04361 + }, + { + "decimal_age": 13.92, + "L": 1, + "M": 159.5691, + "S": 0.04353 + }, + { + "decimal_age": 14, + "L": 1, + "M": 159.789, + "S": 0.04345 + }, + { + "decimal_age": 14.08, + "L": 1, + "M": 159.9983, + "S": 0.04337 + }, + { + "decimal_age": 14.17, + "L": 1, + "M": 160.1971, + "S": 0.0433 + }, + { + "decimal_age": 14.25, + "L": 1, + "M": 160.3857, + "S": 0.04322 + }, + { + "decimal_age": 14.33, + "L": 1, + "M": 160.5643, + "S": 0.04314 + }, + { + "decimal_age": 14.42, + "L": 1, + "M": 160.7332, + "S": 0.04307 + }, + { + "decimal_age": 14.5, + "L": 1, + "M": 160.8927, + "S": 0.04299 + }, + { + "decimal_age": 14.58, + "L": 1, + "M": 161.043, + "S": 0.04292 + }, + { + "decimal_age": 14.67, + "L": 1, + "M": 161.1845, + "S": 0.04284 + }, + { + "decimal_age": 14.75, + "L": 1, + "M": 161.3176, + "S": 0.04277 + }, + { + "decimal_age": 14.83, + "L": 1, + "M": 161.4425, + "S": 0.0427 + }, + { + "decimal_age": 14.92, + "L": 1, + "M": 161.5596, + "S": 0.04263 + }, + { + "decimal_age": 15, + "L": 1, + "M": 161.6692, + "S": 0.04255 + }, + { + "decimal_age": 15.08, + "L": 1, + "M": 161.7717, + "S": 0.04248 + }, + { + "decimal_age": 15.17, + "L": 1, + "M": 161.8673, + "S": 0.04241 + }, + { + "decimal_age": 15.25, + "L": 1, + "M": 161.9564, + "S": 0.04235 + }, + { + "decimal_age": 15.33, + "L": 1, + "M": 162.0393, + "S": 0.04228 + }, + { + "decimal_age": 15.42, + "L": 1, + "M": 162.1164, + "S": 0.04221 + }, + { + "decimal_age": 15.5, + "L": 1, + "M": 162.188, + "S": 0.04214 + }, + { + "decimal_age": 15.58, + "L": 1, + "M": 162.2542, + "S": 0.04208 + }, + { + "decimal_age": 15.67, + "L": 1, + "M": 162.3154, + "S": 0.04201 + }, + { + "decimal_age": 15.75, + "L": 1, + "M": 162.3719, + "S": 0.04195 + }, + { + "decimal_age": 15.83, + "L": 1, + "M": 162.4239, + "S": 0.04189 + }, + { + "decimal_age": 15.92, + "L": 1, + "M": 162.4717, + "S": 0.04182 + }, + { + "decimal_age": 16, + "L": 1, + "M": 162.5156, + "S": 0.04176 + }, + { + "decimal_age": 16.08, + "L": 1, + "M": 162.556, + "S": 0.0417 + }, + { + "decimal_age": 16.17, + "L": 1, + "M": 162.5933, + "S": 0.04164 + }, + { + "decimal_age": 16.25, + "L": 1, + "M": 162.6276, + "S": 0.04158 + }, + { + "decimal_age": 16.33, + "L": 1, + "M": 162.6594, + "S": 0.04152 + }, + { + "decimal_age": 16.42, + "L": 1, + "M": 162.689, + "S": 0.04147 + }, + { + "decimal_age": 16.5, + "L": 1, + "M": 162.7165, + "S": 0.04141 + }, + { + "decimal_age": 16.58, + "L": 1, + "M": 162.7425, + "S": 0.04136 + }, + { + "decimal_age": 16.67, + "L": 1, + "M": 162.767, + "S": 0.0413 + }, + { + "decimal_age": 16.75, + "L": 1, + "M": 162.7904, + "S": 0.04125 + }, + { + "decimal_age": 16.83, + "L": 1, + "M": 162.8126, + "S": 0.04119 + }, + { + "decimal_age": 16.92, + "L": 1, + "M": 162.834, + "S": 0.04114 + }, + { + "decimal_age": 17, + "L": 1, + "M": 162.8545, + "S": 0.04109 + }, + { + "decimal_age": 17.08, + "L": 1, + "M": 162.8743, + "S": 0.04104 + }, + { + "decimal_age": 17.17, + "L": 1, + "M": 162.8935, + "S": 0.04099 + }, + { + "decimal_age": 17.25, + "L": 1, + "M": 162.912, + "S": 0.04094 + }, + { + "decimal_age": 17.33, + "L": 1, + "M": 162.93, + "S": 0.04089 + }, + { + "decimal_age": 17.42, + "L": 1, + "M": 162.9476, + "S": 0.04084 + }, + { + "decimal_age": 17.5, + "L": 1, + "M": 162.9649, + "S": 0.0408 + }, + { + "decimal_age": 17.58, + "L": 1, + "M": 162.9817, + "S": 0.04075 + }, + { + "decimal_age": 17.67, + "L": 1, + "M": 162.9983, + "S": 0.04071 + }, + { + "decimal_age": 17.75, + "L": 1, + "M": 163.0144, + "S": 0.04066 + }, + { + "decimal_age": 17.83, + "L": 1, + "M": 163.03, + "S": 0.04062 + }, + { + "decimal_age": 17.92, + "L": 1, + "M": 163.0451, + "S": 0.04058 + }, + { + "decimal_age": 18, + "L": 1, + "M": 163.0595, + "S": 0.04053 + }, + { + "decimal_age": 18.08, + "L": 1, + "M": 163.0733, + "S": 0.04049 + }, + { + "decimal_age": 18.17, + "L": 1, + "M": 163.0862, + "S": 0.04045 + }, + { + "decimal_age": 18.25, + "L": 1, + "M": 163.0982, + "S": 0.04041 + }, + { + "decimal_age": 18.33, + "L": 1, + "M": 163.1092, + "S": 0.04037 + }, + { + "decimal_age": 18.42, + "L": 1, + "M": 163.1192, + "S": 0.04034 + }, + { + "decimal_age": 18.5, + "L": 1, + "M": 163.1279, + "S": 0.0403 + }, + { + "decimal_age": 18.58, + "L": 1, + "M": 163.1355, + "S": 0.04026 + }, + { + "decimal_age": 18.67, + "L": 1, + "M": 163.1418, + "S": 0.04023 + }, + { + "decimal_age": 18.75, + "L": 1, + "M": 163.1469, + "S": 0.04019 + }, + { + "decimal_age": 18.83, + "L": 1, + "M": 163.1508, + "S": 0.04016 + }, + { + "decimal_age": 18.92, + "L": 1, + "M": 163.1534, + "S": 0.04012 + }, + { + "decimal_age": 19, + "L": 1, + "M": 163.1548, + "S": 0.04009 + } + ] + }, + "weight": { + "male":[ + { + "decimal_age": 5.08, + "L": -0.2026, + "M": 18.5057, + "S": 0.12988 + }, + { + "decimal_age": 5.17, + "L": -0.213, + "M": 18.6802, + "S": 0.13028 + }, + { + "decimal_age": 5.25, + "L": -0.2234, + "M": 18.8563, + "S": 0.13067 + }, + { + "decimal_age": 5.33, + "L": -0.2338, + "M": 19.034, + "S": 0.13105 + }, + { + "decimal_age": 5.42, + "L": -0.2443, + "M": 19.2132, + "S": 0.13142 + }, + { + "decimal_age": 5.5, + "L": -0.2548, + "M": 19.394, + "S": 0.13178 + }, + { + "decimal_age": 5.58, + "L": -0.2653, + "M": 19.5765, + "S": 0.13213 + }, + { + "decimal_age": 5.67, + "L": -0.2758, + "M": 19.7607, + "S": 0.13246 + }, + { + "decimal_age": 5.75, + "L": -0.2864, + "M": 19.9468, + "S": 0.13279 + }, + { + "decimal_age": 5.83, + "L": -0.2969, + "M": 20.1344, + "S": 0.13311 + }, + { + "decimal_age": 5.92, + "L": -0.3075, + "M": 20.3235, + "S": 0.13342 + }, + { + "decimal_age": 6, + "L": -0.318, + "M": 20.5137, + "S": 0.13372 + }, + { + "decimal_age": 6.08, + "L": -0.3285, + "M": 20.7052, + "S": 0.13402 + }, + { + "decimal_age": 6.17, + "L": -0.339, + "M": 20.8979, + "S": 0.13432 + }, + { + "decimal_age": 6.25, + "L": -0.3494, + "M": 21.0918, + "S": 0.13462 + }, + { + "decimal_age": 6.33, + "L": -0.3598, + "M": 21.287, + "S": 0.13493 + }, + { + "decimal_age": 6.42, + "L": -0.3701, + "M": 21.4833, + "S": 0.13523 + }, + { + "decimal_age": 6.5, + "L": -0.3804, + "M": 21.681, + "S": 0.13554 + }, + { + "decimal_age": 6.58, + "L": -0.3906, + "M": 21.8799, + "S": 0.13586 + }, + { + "decimal_age": 6.67, + "L": -0.4007, + "M": 22.08, + "S": 0.13618 + }, + { + "decimal_age": 6.75, + "L": -0.4107, + "M": 22.2813, + "S": 0.13652 + }, + { + "decimal_age": 6.83, + "L": -0.4207, + "M": 22.4837, + "S": 0.13686 + }, + { + "decimal_age": 6.92, + "L": -0.4305, + "M": 22.6872, + "S": 0.13722 + }, + { + "decimal_age": 7, + "L": -0.4402, + "M": 22.8915, + "S": 0.13759 + }, + { + "decimal_age": 7.08, + "L": -0.4499, + "M": 23.0968, + "S": 0.13797 + }, + { + "decimal_age": 7.17, + "L": -0.4594, + "M": 23.3029, + "S": 0.13838 + }, + { + "decimal_age": 7.25, + "L": -0.4688, + "M": 23.5101, + "S": 0.1388 + }, + { + "decimal_age": 7.33, + "L": -0.4781, + "M": 23.7182, + "S": 0.13923 + }, + { + "decimal_age": 7.42, + "L": -0.4873, + "M": 23.9272, + "S": 0.13969 + }, + { + "decimal_age": 7.5, + "L": -0.4964, + "M": 24.1371, + "S": 0.14016 + }, + { + "decimal_age": 7.58, + "L": -0.5053, + "M": 24.3479, + "S": 0.14065 + }, + { + "decimal_age": 7.67, + "L": -0.5142, + "M": 24.5595, + "S": 0.14117 + }, + { + "decimal_age": 7.75, + "L": -0.5229, + "M": 24.7722, + "S": 0.1417 + }, + { + "decimal_age": 7.83, + "L": -0.5315, + "M": 24.9858, + "S": 0.14226 + }, + { + "decimal_age": 7.92, + "L": -0.5399, + "M": 25.2005, + "S": 0.14284 + }, + { + "decimal_age": 8, + "L": -0.5482, + "M": 25.4163, + "S": 0.14344 + }, + { + "decimal_age": 8.08, + "L": -0.5564, + "M": 25.6332, + "S": 0.14407 + }, + { + "decimal_age": 8.17, + "L": -0.5644, + "M": 25.8513, + "S": 0.14472 + }, + { + "decimal_age": 8.25, + "L": -0.5722, + "M": 26.0706, + "S": 0.14539 + }, + { + "decimal_age": 8.33, + "L": -0.5799, + "M": 26.2911, + "S": 0.14608 + }, + { + "decimal_age": 8.42, + "L": -0.5873, + "M": 26.5128, + "S": 0.14679 + }, + { + "decimal_age": 8.5, + "L": -0.5946, + "M": 26.7358, + "S": 0.14752 + }, + { + "decimal_age": 8.58, + "L": -0.6017, + "M": 26.9602, + "S": 0.14828 + }, + { + "decimal_age": 8.67, + "L": -0.6085, + "M": 27.1861, + "S": 0.14905 + }, + { + "decimal_age": 8.75, + "L": -0.6152, + "M": 27.4137, + "S": 0.14984 + }, + { + "decimal_age": 8.83, + "L": -0.6216, + "M": 27.6432, + "S": 0.15066 + }, + { + "decimal_age": 8.92, + "L": -0.6278, + "M": 27.875, + "S": 0.15149 + }, + { + "decimal_age": 9, + "L": -0.6337, + "M": 28.1092, + "S": 0.15233 + }, + { + "decimal_age": 9.08, + "L": -0.6393, + "M": 28.3459, + "S": 0.15319 + }, + { + "decimal_age": 9.17, + "L": -0.6446, + "M": 28.5854, + "S": 0.15406 + }, + { + "decimal_age": 9.25, + "L": -0.6496, + "M": 28.8277, + "S": 0.15493 + }, + { + "decimal_age": 9.33, + "L": -0.6543, + "M": 29.0731, + "S": 0.15581 + }, + { + "decimal_age": 9.42, + "L": -0.6585, + "M": 29.3217, + "S": 0.1567 + }, + { + "decimal_age": 9.5, + "L": -0.6624, + "M": 29.5736, + "S": 0.1576 + }, + { + "decimal_age": 9.58, + "L": -0.6659, + "M": 29.8289, + "S": 0.1585 + }, + { + "decimal_age": 9.67, + "L": -0.6689, + "M": 30.0877, + "S": 0.1594 + }, + { + "decimal_age": 9.75, + "L": -0.6714, + "M": 30.3501, + "S": 0.16031 + }, + { + "decimal_age": 9.83, + "L": -0.6735, + "M": 30.616, + "S": 0.16122 + }, + { + "decimal_age": 9.92, + "L": -0.6752, + "M": 30.8854, + "S": 0.16213 + }, + { + "decimal_age": 10, + "L": -0.6764, + "M": 31.1586, + "S": 0.16305 + } + ], + "female":[ + { + "decimal_age": 5.08, + "L": -0.4681, + "M": 18.2579, + "S": 0.14295 + }, + { + "decimal_age": 5.17, + "L": -0.4711, + "M": 18.4329, + "S": 0.1435 + }, + { + "decimal_age": 5.25, + "L": -0.4742, + "M": 18.6073, + "S": 0.14404 + }, + { + "decimal_age": 5.33, + "L": -0.4773, + "M": 18.7811, + "S": 0.14459 + }, + { + "decimal_age": 5.42, + "L": -0.4803, + "M": 18.9545, + "S": 0.14514 + }, + { + "decimal_age": 5.5, + "L": -0.4834, + "M": 19.1276, + "S": 0.14569 + }, + { + "decimal_age": 5.58, + "L": -0.4864, + "M": 19.3004, + "S": 0.14624 + }, + { + "decimal_age": 5.67, + "L": -0.4894, + "M": 19.473, + "S": 0.14679 + }, + { + "decimal_age": 5.75, + "L": -0.4924, + "M": 19.6455, + "S": 0.14735 + }, + { + "decimal_age": 5.83, + "L": -0.4954, + "M": 19.818, + "S": 0.1479 + }, + { + "decimal_age": 5.92, + "L": -0.4984, + "M": 19.9908, + "S": 0.14845 + }, + { + "decimal_age": 6, + "L": -0.5013, + "M": 20.1639, + "S": 0.149 + }, + { + "decimal_age": 6.08, + "L": -0.5043, + "M": 20.3377, + "S": 0.14955 + }, + { + "decimal_age": 6.17, + "L": -0.5072, + "M": 20.5124, + "S": 0.1501 + }, + { + "decimal_age": 6.25, + "L": -0.51, + "M": 20.6885, + "S": 0.15065 + }, + { + "decimal_age": 6.33, + "L": -0.5129, + "M": 20.8661, + "S": 0.1512 + }, + { + "decimal_age": 6.42, + "L": -0.5157, + "M": 21.0457, + "S": 0.15175 + }, + { + "decimal_age": 6.5, + "L": -0.5185, + "M": 21.2274, + "S": 0.1523 + }, + { + "decimal_age": 6.58, + "L": -0.5213, + "M": 21.4113, + "S": 0.15284 + }, + { + "decimal_age": 6.67, + "L": -0.524, + "M": 21.5979, + "S": 0.15339 + }, + { + "decimal_age": 6.75, + "L": -0.5268, + "M": 21.7872, + "S": 0.15393 + }, + { + "decimal_age": 6.83, + "L": -0.5294, + "M": 21.9795, + "S": 0.15448 + }, + { + "decimal_age": 6.92, + "L": -0.5321, + "M": 22.1751, + "S": 0.15502 + }, + { + "decimal_age": 7, + "L": -0.5347, + "M": 22.374, + "S": 0.15556 + }, + { + "decimal_age": 7.08, + "L": -0.5372, + "M": 22.5762, + "S": 0.1561 + }, + { + "decimal_age": 7.17, + "L": -0.5398, + "M": 22.7816, + "S": 0.15663 + }, + { + "decimal_age": 7.25, + "L": -0.5423, + "M": 22.9904, + "S": 0.15717 + }, + { + "decimal_age": 7.33, + "L": -0.5447, + "M": 23.2025, + "S": 0.1577 + }, + { + "decimal_age": 7.42, + "L": -0.5471, + "M": 23.418, + "S": 0.15823 + }, + { + "decimal_age": 7.5, + "L": -0.5495, + "M": 23.6369, + "S": 0.15876 + }, + { + "decimal_age": 7.58, + "L": -0.5518, + "M": 23.8593, + "S": 0.15928 + }, + { + "decimal_age": 7.67, + "L": -0.5541, + "M": 24.0853, + "S": 0.1598 + }, + { + "decimal_age": 7.75, + "L": -0.5563, + "M": 24.3149, + "S": 0.16032 + }, + { + "decimal_age": 7.83, + "L": -0.5585, + "M": 24.5482, + "S": 0.16084 + }, + { + "decimal_age": 7.92, + "L": -0.5606, + "M": 24.7853, + "S": 0.16135 + }, + { + "decimal_age": 8, + "L": -0.5627, + "M": 25.0262, + "S": 0.16186 + }, + { + "decimal_age": 8.08, + "L": -0.5647, + "M": 25.271, + "S": 0.16237 + }, + { + "decimal_age": 8.17, + "L": -0.5667, + "M": 25.5197, + "S": 0.16287 + }, + { + "decimal_age": 8.25, + "L": -0.5686, + "M": 25.7721, + "S": 0.16337 + }, + { + "decimal_age": 8.33, + "L": -0.5704, + "M": 26.0284, + "S": 0.16386 + }, + { + "decimal_age": 8.42, + "L": -0.5722, + "M": 26.2883, + "S": 0.16435 + }, + { + "decimal_age": 8.5, + "L": -0.574, + "M": 26.5519, + "S": 0.16483 + }, + { + "decimal_age": 8.58, + "L": -0.5757, + "M": 26.819, + "S": 0.16532 + }, + { + "decimal_age": 8.67, + "L": -0.5773, + "M": 27.0896, + "S": 0.16579 + }, + { + "decimal_age": 8.75, + "L": -0.5789, + "M": 27.3635, + "S": 0.16626 + }, + { + "decimal_age": 8.83, + "L": -0.5804, + "M": 27.6406, + "S": 0.16673 + }, + { + "decimal_age": 8.92, + "L": -0.5819, + "M": 27.9208, + "S": 0.16719 + }, + { + "decimal_age": 9, + "L": -0.5833, + "M": 28.204, + "S": 0.16764 + }, + { + "decimal_age": 9.08, + "L": -0.5847, + "M": 28.4901, + "S": 0.16809 + }, + { + "decimal_age": 9.17, + "L": -0.5859, + "M": 28.7791, + "S": 0.16854 + }, + { + "decimal_age": 9.25, + "L": -0.5872, + "M": 29.0711, + "S": 0.16897 + }, + { + "decimal_age": 9.33, + "L": -0.5883, + "M": 29.3663, + "S": 0.16941 + }, + { + "decimal_age": 9.42, + "L": -0.5895, + "M": 29.6646, + "S": 0.16983 + }, + { + "decimal_age": 9.5, + "L": -0.5905, + "M": 29.9663, + "S": 0.17025 + }, + { + "decimal_age": 9.58, + "L": -0.5915, + "M": 30.2715, + "S": 0.17066 + }, + { + "decimal_age": 9.67, + "L": -0.5925, + "M": 30.5805, + "S": 0.17107 + }, + { + "decimal_age": 9.75, + "L": -0.5934, + "M": 30.8934, + "S": 0.17146 + }, + { + "decimal_age": 9.83, + "L": -0.5942, + "M": 31.2105, + "S": 0.17186 + }, + { + "decimal_age": 9.92, + "L": -0.595, + "M": 31.5319, + "S": 0.17224 + }, + { + "decimal_age": 10, + "L": -0.5958, + "M": 31.8578, + "S": 0.17262 + } + ] + }, + "ofc": { + "male":[], + "female":[] + }, + "bmi": { + "male":[ + { + "decimal_age": 5.08, + "L": -0.7387, + "M": 15.2641, + "S": 0.0839 + }, + { + "decimal_age": 5.17, + "L": -0.7621, + "M": 15.2616, + "S": 0.08414 + }, + { + "decimal_age": 5.25, + "L": -0.7856, + "M": 15.2604, + "S": 0.08439 + }, + { + "decimal_age": 5.33, + "L": -0.8089, + "M": 15.2605, + "S": 0.08464 + }, + { + "decimal_age": 5.42, + "L": -0.8322, + "M": 15.2619, + "S": 0.0849 + }, + { + "decimal_age": 5.5, + "L": -0.8554, + "M": 15.2645, + "S": 0.08516 + }, + { + "decimal_age": 5.58, + "L": -0.8785, + "M": 15.2684, + "S": 0.08543 + }, + { + "decimal_age": 5.67, + "L": -0.9015, + "M": 15.2737, + "S": 0.0857 + }, + { + "decimal_age": 5.75, + "L": -0.9243, + "M": 15.2801, + "S": 0.08597 + }, + { + "decimal_age": 5.83, + "L": -0.9471, + "M": 15.2877, + "S": 0.08625 + }, + { + "decimal_age": 5.92, + "L": -0.9697, + "M": 15.2965, + "S": 0.08653 + }, + { + "decimal_age": 6, + "L": -0.9921, + "M": 15.3062, + "S": 0.08682 + }, + { + "decimal_age": 6.08, + "L": -1.0144, + "M": 15.3169, + "S": 0.08711 + }, + { + "decimal_age": 6.17, + "L": -1.0365, + "M": 15.3285, + "S": 0.08741 + }, + { + "decimal_age": 6.25, + "L": -1.0584, + "M": 15.3408, + "S": 0.08771 + }, + { + "decimal_age": 6.33, + "L": -1.0801, + "M": 15.354, + "S": 0.08802 + }, + { + "decimal_age": 6.42, + "L": -1.1017, + "M": 15.3679, + "S": 0.08833 + }, + { + "decimal_age": 6.5, + "L": -1.123, + "M": 15.3825, + "S": 0.08865 + }, + { + "decimal_age": 6.58, + "L": -1.1441, + "M": 15.3978, + "S": 0.08898 + }, + { + "decimal_age": 6.67, + "L": -1.1649, + "M": 15.4137, + "S": 0.08931 + }, + { + "decimal_age": 6.75, + "L": -1.1856, + "M": 15.4302, + "S": 0.08964 + }, + { + "decimal_age": 6.83, + "L": -1.206, + "M": 15.4473, + "S": 0.08998 + }, + { + "decimal_age": 6.92, + "L": -1.2261, + "M": 15.465, + "S": 0.09033 + }, + { + "decimal_age": 7, + "L": -1.246, + "M": 15.4832, + "S": 0.09068 + }, + { + "decimal_age": 7.08, + "L": -1.2656, + "M": 15.5019, + "S": 0.09103 + }, + { + "decimal_age": 7.17, + "L": -1.2849, + "M": 15.521, + "S": 0.09139 + }, + { + "decimal_age": 7.25, + "L": -1.304, + "M": 15.5407, + "S": 0.09176 + }, + { + "decimal_age": 7.33, + "L": -1.3228, + "M": 15.5608, + "S": 0.09213 + }, + { + "decimal_age": 7.42, + "L": -1.3414, + "M": 15.5814, + "S": 0.09251 + }, + { + "decimal_age": 7.5, + "L": -1.3596, + "M": 15.6023, + "S": 0.09289 + }, + { + "decimal_age": 7.58, + "L": -1.3776, + "M": 15.6237, + "S": 0.09327 + }, + { + "decimal_age": 7.67, + "L": -1.3953, + "M": 15.6455, + "S": 0.09366 + }, + { + "decimal_age": 7.75, + "L": -1.4126, + "M": 15.6677, + "S": 0.09406 + }, + { + "decimal_age": 7.83, + "L": -1.4297, + "M": 15.6903, + "S": 0.09445 + }, + { + "decimal_age": 7.92, + "L": -1.4464, + "M": 15.7133, + "S": 0.09486 + }, + { + "decimal_age": 8, + "L": -1.4629, + "M": 15.7368, + "S": 0.09526 + }, + { + "decimal_age": 8.08, + "L": -1.479, + "M": 15.7606, + "S": 0.09567 + }, + { + "decimal_age": 8.17, + "L": -1.4947, + "M": 15.7848, + "S": 0.09609 + }, + { + "decimal_age": 8.25, + "L": -1.5101, + "M": 15.8094, + "S": 0.09651 + }, + { + "decimal_age": 8.33, + "L": -1.5252, + "M": 15.8344, + "S": 0.09693 + }, + { + "decimal_age": 8.42, + "L": -1.5399, + "M": 15.8597, + "S": 0.09735 + }, + { + "decimal_age": 8.5, + "L": -1.5542, + "M": 15.8855, + "S": 0.09778 + }, + { + "decimal_age": 8.58, + "L": -1.5681, + "M": 15.9116, + "S": 0.09821 + }, + { + "decimal_age": 8.67, + "L": -1.5817, + "M": 15.9381, + "S": 0.09864 + }, + { + "decimal_age": 8.75, + "L": -1.5948, + "M": 15.9651, + "S": 0.09907 + }, + { + "decimal_age": 8.83, + "L": -1.6076, + "M": 15.9925, + "S": 0.09951 + }, + { + "decimal_age": 8.92, + "L": -1.6199, + "M": 16.0205, + "S": 0.09994 + }, + { + "decimal_age": 9, + "L": -1.6318, + "M": 16.049, + "S": 0.10038 + }, + { + "decimal_age": 9.08, + "L": -1.6433, + "M": 16.0781, + "S": 0.10082 + }, + { + "decimal_age": 9.17, + "L": -1.6544, + "M": 16.1078, + "S": 0.10126 + }, + { + "decimal_age": 9.25, + "L": -1.6651, + "M": 16.1381, + "S": 0.1017 + }, + { + "decimal_age": 9.33, + "L": -1.6753, + "M": 16.1692, + "S": 0.10214 + }, + { + "decimal_age": 9.42, + "L": -1.6851, + "M": 16.2009, + "S": 0.10259 + }, + { + "decimal_age": 9.5, + "L": -1.6944, + "M": 16.2333, + "S": 0.10303 + }, + { + "decimal_age": 9.58, + "L": -1.7032, + "M": 16.2665, + "S": 0.10347 + }, + { + "decimal_age": 9.67, + "L": -1.7116, + "M": 16.3004, + "S": 0.10391 + }, + { + "decimal_age": 9.75, + "L": -1.7196, + "M": 16.3351, + "S": 0.10435 + }, + { + "decimal_age": 9.83, + "L": -1.7271, + "M": 16.3704, + "S": 0.10478 + }, + { + "decimal_age": 9.92, + "L": -1.7341, + "M": 16.4065, + "S": 0.10522 + }, + { + "decimal_age": 10, + "L": -1.7407, + "M": 16.4433, + "S": 0.10566 + }, + { + "decimal_age": 10.08, + "L": -1.7468, + "M": 16.4807, + "S": 0.10609 + }, + { + "decimal_age": 10.17, + "L": -1.7525, + "M": 16.5189, + "S": 0.10652 + }, + { + "decimal_age": 10.25, + "L": -1.7578, + "M": 16.5578, + "S": 0.10695 + }, + { + "decimal_age": 10.33, + "L": -1.7626, + "M": 16.5974, + "S": 0.10738 + }, + { + "decimal_age": 10.42, + "L": -1.767, + "M": 16.6376, + "S": 0.1078 + }, + { + "decimal_age": 10.5, + "L": -1.771, + "M": 16.6786, + "S": 0.10823 + }, + { + "decimal_age": 10.58, + "L": -1.7745, + "M": 16.7203, + "S": 0.10865 + }, + { + "decimal_age": 10.67, + "L": -1.7777, + "M": 16.7628, + "S": 0.10906 + }, + { + "decimal_age": 10.75, + "L": -1.7804, + "M": 16.8059, + "S": 0.10948 + }, + { + "decimal_age": 10.83, + "L": -1.7828, + "M": 16.8497, + "S": 0.10989 + }, + { + "decimal_age": 10.92, + "L": -1.7847, + "M": 16.8941, + "S": 0.1103 + }, + { + "decimal_age": 11, + "L": -1.7862, + "M": 16.9392, + "S": 0.1107 + }, + { + "decimal_age": 11.08, + "L": -1.7873, + "M": 16.985, + "S": 0.1111 + }, + { + "decimal_age": 11.17, + "L": -1.7881, + "M": 17.0314, + "S": 0.1115 + }, + { + "decimal_age": 11.25, + "L": -1.7884, + "M": 17.0784, + "S": 0.11189 + }, + { + "decimal_age": 11.33, + "L": -1.7884, + "M": 17.1262, + "S": 0.11228 + }, + { + "decimal_age": 11.42, + "L": -1.788, + "M": 17.1746, + "S": 0.11266 + }, + { + "decimal_age": 11.5, + "L": -1.7873, + "M": 17.2236, + "S": 0.11304 + }, + { + "decimal_age": 11.58, + "L": -1.7861, + "M": 17.2734, + "S": 0.11342 + }, + { + "decimal_age": 11.67, + "L": -1.7846, + "M": 17.324, + "S": 0.11379 + }, + { + "decimal_age": 11.75, + "L": -1.7828, + "M": 17.3752, + "S": 0.11415 + }, + { + "decimal_age": 11.83, + "L": -1.7806, + "M": 17.4272, + "S": 0.11451 + }, + { + "decimal_age": 11.92, + "L": -1.778, + "M": 17.4799, + "S": 0.11487 + }, + { + "decimal_age": 12, + "L": -1.7751, + "M": 17.5334, + "S": 0.11522 + }, + { + "decimal_age": 12.08, + "L": -1.7719, + "M": 17.5877, + "S": 0.11556 + }, + { + "decimal_age": 12.17, + "L": -1.7684, + "M": 17.6427, + "S": 0.1159 + }, + { + "decimal_age": 12.25, + "L": -1.7645, + "M": 17.6985, + "S": 0.11623 + }, + { + "decimal_age": 12.33, + "L": -1.7604, + "M": 17.7551, + "S": 0.11656 + }, + { + "decimal_age": 12.42, + "L": -1.7559, + "M": 17.8124, + "S": 0.11688 + }, + { + "decimal_age": 12.5, + "L": -1.7511, + "M": 17.8704, + "S": 0.1172 + }, + { + "decimal_age": 12.58, + "L": -1.7461, + "M": 17.9292, + "S": 0.11751 + }, + { + "decimal_age": 12.67, + "L": -1.7408, + "M": 17.9887, + "S": 0.11781 + }, + { + "decimal_age": 12.75, + "L": -1.7352, + "M": 18.0488, + "S": 0.11811 + }, + { + "decimal_age": 12.83, + "L": -1.7293, + "M": 18.1096, + "S": 0.11841 + }, + { + "decimal_age": 12.92, + "L": -1.7232, + "M": 18.171, + "S": 0.11869 + }, + { + "decimal_age": 13, + "L": -1.7168, + "M": 18.233, + "S": 0.11898 + }, + { + "decimal_age": 13.08, + "L": -1.7102, + "M": 18.2955, + "S": 0.11925 + }, + { + "decimal_age": 13.17, + "L": -1.7033, + "M": 18.3586, + "S": 0.11952 + }, + { + "decimal_age": 13.25, + "L": -1.6962, + "M": 18.4221, + "S": 0.11979 + }, + { + "decimal_age": 13.33, + "L": -1.6888, + "M": 18.486, + "S": 0.12005 + }, + { + "decimal_age": 13.42, + "L": -1.6811, + "M": 18.5502, + "S": 0.1203 + }, + { + "decimal_age": 13.5, + "L": -1.6732, + "M": 18.6148, + "S": 0.12055 + }, + { + "decimal_age": 13.58, + "L": -1.6651, + "M": 18.6795, + "S": 0.12079 + }, + { + "decimal_age": 13.67, + "L": -1.6568, + "M": 18.7445, + "S": 0.12102 + }, + { + "decimal_age": 13.75, + "L": -1.6482, + "M": 18.8095, + "S": 0.12125 + }, + { + "decimal_age": 13.83, + "L": -1.6394, + "M": 18.8746, + "S": 0.12148 + }, + { + "decimal_age": 13.92, + "L": -1.6304, + "M": 18.9398, + "S": 0.1217 + }, + { + "decimal_age": 14, + "L": -1.6211, + "M": 19.005, + "S": 0.12191 + }, + { + "decimal_age": 14.08, + "L": -1.6116, + "M": 19.0701, + "S": 0.12212 + }, + { + "decimal_age": 14.17, + "L": -1.602, + "M": 19.1351, + "S": 0.12233 + }, + { + "decimal_age": 14.25, + "L": -1.5921, + "M": 19.2, + "S": 0.12253 + }, + { + "decimal_age": 14.33, + "L": -1.5821, + "M": 19.2648, + "S": 0.12272 + }, + { + "decimal_age": 14.42, + "L": -1.5719, + "M": 19.3294, + "S": 0.12291 + }, + { + "decimal_age": 14.5, + "L": -1.5615, + "M": 19.3937, + "S": 0.1231 + }, + { + "decimal_age": 14.58, + "L": -1.551, + "M": 19.4578, + "S": 0.12328 + }, + { + "decimal_age": 14.67, + "L": -1.5403, + "M": 19.5217, + "S": 0.12346 + }, + { + "decimal_age": 14.75, + "L": -1.5294, + "M": 19.5853, + "S": 0.12363 + }, + { + "decimal_age": 14.83, + "L": -1.5185, + "M": 19.6486, + "S": 0.1238 + }, + { + "decimal_age": 14.92, + "L": -1.5074, + "M": 19.7117, + "S": 0.12396 + }, + { + "decimal_age": 15, + "L": -1.4961, + "M": 19.7744, + "S": 0.12412 + }, + { + "decimal_age": 15.08, + "L": -1.4848, + "M": 19.8367, + "S": 0.12428 + }, + { + "decimal_age": 15.17, + "L": -1.4733, + "M": 19.8987, + "S": 0.12443 + }, + { + "decimal_age": 15.25, + "L": -1.4617, + "M": 19.9603, + "S": 0.12458 + }, + { + "decimal_age": 15.33, + "L": -1.45, + "M": 20.0215, + "S": 0.12473 + }, + { + "decimal_age": 15.42, + "L": -1.4382, + "M": 20.0823, + "S": 0.12487 + }, + { + "decimal_age": 15.5, + "L": -1.4263, + "M": 20.1427, + "S": 0.12501 + }, + { + "decimal_age": 15.58, + "L": -1.4143, + "M": 20.2026, + "S": 0.12514 + }, + { + "decimal_age": 15.67, + "L": -1.4022, + "M": 20.2621, + "S": 0.12528 + }, + { + "decimal_age": 15.75, + "L": -1.39, + "M": 20.3211, + "S": 0.12541 + }, + { + "decimal_age": 15.83, + "L": -1.3777, + "M": 20.3796, + "S": 0.12554 + }, + { + "decimal_age": 15.92, + "L": -1.3653, + "M": 20.4376, + "S": 0.12567 + }, + { + "decimal_age": 16, + "L": -1.3529, + "M": 20.4951, + "S": 0.12579 + }, + { + "decimal_age": 16.08, + "L": -1.3403, + "M": 20.5521, + "S": 0.12591 + }, + { + "decimal_age": 16.17, + "L": -1.3277, + "M": 20.6085, + "S": 0.12603 + }, + { + "decimal_age": 16.25, + "L": -1.3149, + "M": 20.6644, + "S": 0.12615 + }, + { + "decimal_age": 16.33, + "L": -1.3021, + "M": 20.7197, + "S": 0.12627 + }, + { + "decimal_age": 16.42, + "L": -1.2892, + "M": 20.7745, + "S": 0.12638 + }, + { + "decimal_age": 16.5, + "L": -1.2762, + "M": 20.8287, + "S": 0.1265 + }, + { + "decimal_age": 16.58, + "L": -1.2631, + "M": 20.8824, + "S": 0.12661 + }, + { + "decimal_age": 16.67, + "L": -1.2499, + "M": 20.9355, + "S": 0.12672 + }, + { + "decimal_age": 16.75, + "L": -1.2366, + "M": 20.9881, + "S": 0.12683 + }, + { + "decimal_age": 16.83, + "L": -1.2233, + "M": 21.04, + "S": 0.12694 + }, + { + "decimal_age": 16.92, + "L": -1.2098, + "M": 21.0914, + "S": 0.12704 + }, + { + "decimal_age": 17, + "L": -1.1962, + "M": 21.1423, + "S": 0.12715 + }, + { + "decimal_age": 17.08, + "L": -1.1826, + "M": 21.1925, + "S": 0.12726 + }, + { + "decimal_age": 17.17, + "L": -1.1688, + "M": 21.2423, + "S": 0.12736 + }, + { + "decimal_age": 17.25, + "L": -1.155, + "M": 21.2914, + "S": 0.12746 + }, + { + "decimal_age": 17.33, + "L": -1.141, + "M": 21.34, + "S": 0.12756 + }, + { + "decimal_age": 17.42, + "L": -1.127, + "M": 21.388, + "S": 0.12767 + }, + { + "decimal_age": 17.5, + "L": -1.1129, + "M": 21.4354, + "S": 0.12777 + }, + { + "decimal_age": 17.58, + "L": -1.0986, + "M": 21.4822, + "S": 0.12787 + }, + { + "decimal_age": 17.67, + "L": -1.0843, + "M": 21.5285, + "S": 0.12797 + }, + { + "decimal_age": 17.75, + "L": -1.0699, + "M": 21.5742, + "S": 0.12807 + }, + { + "decimal_age": 17.83, + "L": -1.0553, + "M": 21.6193, + "S": 0.12816 + }, + { + "decimal_age": 17.92, + "L": -1.0407, + "M": 21.6638, + "S": 0.12826 + }, + { + "decimal_age": 18, + "L": -1.026, + "M": 21.7077, + "S": 0.12836 + }, + { + "decimal_age": 18.08, + "L": -1.0112, + "M": 21.751, + "S": 0.12845 + }, + { + "decimal_age": 18.17, + "L": -0.9962, + "M": 21.7937, + "S": 0.12855 + }, + { + "decimal_age": 18.25, + "L": -0.9812, + "M": 21.8358, + "S": 0.12864 + }, + { + "decimal_age": 18.33, + "L": -0.9661, + "M": 21.8773, + "S": 0.12874 + }, + { + "decimal_age": 18.42, + "L": -0.9509, + "M": 21.9182, + "S": 0.12883 + }, + { + "decimal_age": 18.5, + "L": -0.9356, + "M": 21.9585, + "S": 0.12893 + }, + { + "decimal_age": 18.58, + "L": -0.9202, + "M": 21.9982, + "S": 0.12902 + }, + { + "decimal_age": 18.67, + "L": -0.9048, + "M": 22.0374, + "S": 0.12911 + }, + { + "decimal_age": 18.75, + "L": -0.8892, + "M": 22.076, + "S": 0.1292 + }, + { + "decimal_age": 18.83, + "L": -0.8735, + "M": 22.114, + "S": 0.1293 + }, + { + "decimal_age": 18.92, + "L": -0.8578, + "M": 22.1514, + "S": 0.12939 + }, + { + "decimal_age": 19, + "L": -0.8419, + "M": 22.1883, + "S": 0.12948 + } + ], + "female":[ + { + "L": -0.8886, + "M": 15.2441, + "S": 0.09692 + }, + { + "L": -0.9068, + "M": 15.2434, + "S": 0.09738 + }, + { + "L": -0.9248, + "M": 15.2433, + "S": 0.09783 + }, + { + "L": -0.9427, + "M": 15.2438, + "S": 0.09829 + }, + { + "L": -0.9605, + "M": 15.2448, + "S": 0.09875 + }, + { + "L": -0.978, + "M": 15.2464, + "S": 0.0992 + }, + { + "L": -0.9954, + "M": 15.2487, + "S": 0.09966 + }, + { + "L": -1.0126, + "M": 15.2516, + "S": 0.10012 + }, + { + "L": -1.0296, + "M": 15.2551, + "S": 0.10058 + }, + { + "L": -1.0464, + "M": 15.2592, + "S": 0.10104 + }, + { + "L": -1.063, + "M": 15.2641, + "S": 0.10149 + }, + { + "L": -1.0794, + "M": 15.2697, + "S": 0.10195 + }, + { + "L": -1.0956, + "M": 15.276, + "S": 0.10241 + }, + { + "L": -1.1115, + "M": 15.2831, + "S": 0.10287 + }, + { + "L": -1.1272, + "M": 15.2911, + "S": 0.10333 + }, + { + "L": -1.1427, + "M": 15.2998, + "S": 0.10379 + }, + { + "L": -1.1579, + "M": 15.3095, + "S": 0.10425 + }, + { + "L": -1.1728, + "M": 15.32, + "S": 0.10471 + }, + { + "L": -1.1875, + "M": 15.3314, + "S": 0.10517 + }, + { + "L": -1.2019, + "M": 15.3439, + "S": 0.10562 + }, + { + "L": -1.216, + "M": 15.3572, + "S": 0.10608 + }, + { + "L": -1.2298, + "M": 15.3717, + "S": 0.10654 + }, + { + "L": -1.2433, + "M": 15.3871, + "S": 0.107 + }, + { + "L": -1.2565, + "M": 15.4036, + "S": 0.10746 + }, + { + "L": -1.2693, + "M": 15.4211, + "S": 0.10792 + }, + { + "L": -1.2819, + "M": 15.4397, + "S": 0.10837 + }, + { + "L": -1.2941, + "M": 15.4593, + "S": 0.10883 + }, + { + "L": -1.306, + "M": 15.4798, + "S": 0.10929 + }, + { + "L": -1.3175, + "M": 15.5014, + "S": 0.10974 + }, + { + "L": -1.3287, + "M": 15.524, + "S": 0.1102 + }, + { + "L": -1.3395, + "M": 15.5476, + "S": 0.11065 + }, + { + "L": -1.3499, + "M": 15.5723, + "S": 0.1111 + }, + { + "L": -1.36, + "M": 15.5979, + "S": 0.11156 + }, + { + "L": -1.3697, + "M": 15.6246, + "S": 0.11201 + }, + { + "L": -1.379, + "M": 15.6523, + "S": 0.11246 + }, + { + "L": -1.388, + "M": 15.681, + "S": 0.11291 + }, + { + "L": -1.3966, + "M": 15.7107, + "S": 0.11335 + }, + { + "L": -1.4047, + "M": 15.7415, + "S": 0.1138 + }, + { + "L": -1.4125, + "M": 15.7732, + "S": 0.11424 + }, + { + "L": -1.4199, + "M": 15.8058, + "S": 0.11469 + }, + { + "L": -1.427, + "M": 15.8394, + "S": 0.11513 + }, + { + "L": -1.4336, + "M": 15.8738, + "S": 0.11557 + }, + { + "L": -1.4398, + "M": 15.909, + "S": 0.11601 + }, + { + "L": -1.4456, + "M": 15.9451, + "S": 0.11644 + }, + { + "L": -1.4511, + "M": 15.9818, + "S": 0.11688 + }, + { + "L": -1.4561, + "M": 16.0194, + "S": 0.11731 + }, + { + "L": -1.4607, + "M": 16.0575, + "S": 0.11774 + }, + { + "L": -1.465, + "M": 16.0964, + "S": 0.11816 + }, + { + "L": -1.4688, + "M": 16.1358, + "S": 0.11859 + }, + { + "L": -1.4723, + "M": 16.1759, + "S": 0.11901 + }, + { + "L": -1.4753, + "M": 16.2166, + "S": 0.11943 + }, + { + "L": -1.478, + "M": 16.258, + "S": 0.11985 + }, + { + "L": -1.4803, + "M": 16.2999, + "S": 0.12026 + }, + { + "L": -1.4823, + "M": 16.3425, + "S": 0.12067 + }, + { + "L": -1.4838, + "M": 16.3858, + "S": 0.12108 + }, + { + "L": -1.485, + "M": 16.4298, + "S": 0.12148 + }, + { + "L": -1.4859, + "M": 16.4746, + "S": 0.12188 + }, + { + "L": -1.4864, + "M": 16.52, + "S": 0.12228 + }, + { + "L": -1.4866, + "M": 16.5663, + "S": 0.12268 + }, + { + "L": -1.4864, + "M": 16.6133, + "S": 0.12307 + }, + { + "L": -1.4859, + "M": 16.6612, + "S": 0.12346 + }, + { + "L": -1.4851, + "M": 16.71, + "S": 0.12384 + }, + { + "L": -1.4839, + "M": 16.7595, + "S": 0.12422 + }, + { + "L": -1.4825, + "M": 16.81, + "S": 0.1246 + }, + { + "L": -1.4807, + "M": 16.8614, + "S": 0.12497 + }, + { + "L": -1.4787, + "M": 16.9136, + "S": 0.12534 + }, + { + "L": -1.4763, + "M": 16.9667, + "S": 0.12571 + }, + { + "L": -1.4737, + "M": 17.0208, + "S": 0.12607 + }, + { + "L": -1.4708, + "M": 17.0757, + "S": 0.12643 + }, + { + "L": -1.4677, + "M": 17.1316, + "S": 0.12678 + }, + { + "L": -1.4642, + "M": 17.1883, + "S": 0.12713 + }, + { + "L": -1.4606, + "M": 17.2459, + "S": 0.12748 + }, + { + "L": -1.4567, + "M": 17.3044, + "S": 0.12782 + }, + { + "L": -1.4526, + "M": 17.3637, + "S": 0.12816 + }, + { + "L": -1.4482, + "M": 17.4238, + "S": 0.12849 + }, + { + "L": -1.4436, + "M": 17.4847, + "S": 0.12882 + }, + { + "L": -1.4389, + "M": 17.5464, + "S": 0.12914 + }, + { + "L": -1.4339, + "M": 17.6088, + "S": 0.12946 + }, + { + "L": -1.4288, + "M": 17.6719, + "S": 0.12978 + }, + { + "L": -1.4235, + "M": 17.7357, + "S": 0.13009 + }, + { + "L": -1.418, + "M": 17.8001, + "S": 0.1304 + }, + { + "L": -1.4123, + "M": 17.8651, + "S": 0.1307 + }, + { + "L": -1.4065, + "M": 17.9306, + "S": 0.13099 + }, + { + "L": -1.4006, + "M": 17.9966, + "S": 0.13129 + }, + { + "L": -1.3945, + "M": 18.063, + "S": 0.13158 + }, + { + "L": -1.3883, + "M": 18.1297, + "S": 0.13186 + }, + { + "L": -1.3819, + "M": 18.1967, + "S": 0.13214 + }, + { + "L": -1.3755, + "M": 18.2639, + "S": 0.13241 + }, + { + "L": -1.3689, + "M": 18.3312, + "S": 0.13268 + }, + { + "L": -1.3621, + "M": 18.3986, + "S": 0.13295 + }, + { + "L": -1.3553, + "M": 18.466, + "S": 0.13321 + }, + { + "L": -1.3483, + "M": 18.5333, + "S": 0.13347 + }, + { + "L": -1.3413, + "M": 18.6006, + "S": 0.13372 + }, + { + "L": -1.3341, + "M": 18.6677, + "S": 0.13397 + }, + { + "L": -1.3269, + "M": 18.7346, + "S": 0.13421 + }, + { + "L": -1.3195, + "M": 18.8012, + "S": 0.13445 + }, + { + "L": -1.3121, + "M": 18.8675, + "S": 0.13469 + }, + { + "L": -1.3046, + "M": 18.9335, + "S": 0.13492 + }, + { + "L": -1.297, + "M": 18.9991, + "S": 0.13514 + }, + { + "L": -1.2894, + "M": 19.0642, + "S": 0.13537 + }, + { + "L": -1.2816, + "M": 19.1289, + "S": 0.13559 + }, + { + "L": -1.2739, + "M": 19.1931, + "S": 0.1358 + }, + { + "L": -1.2661, + "M": 19.2567, + "S": 0.13601 + }, + { + "L": -1.2583, + "M": 19.3197, + "S": 0.13622 + }, + { + "L": -1.2504, + "M": 19.382, + "S": 0.13642 + }, + { + "L": -1.2425, + "M": 19.4437, + "S": 0.13662 + }, + { + "L": -1.2345, + "M": 19.5045, + "S": 0.13681 + }, + { + "L": -1.2266, + "M": 19.5647, + "S": 0.137 + }, + { + "L": -1.2186, + "M": 19.624, + "S": 0.13719 + }, + { + "L": -1.2107, + "M": 19.6824, + "S": 0.13738 + }, + { + "L": -1.2027, + "M": 19.74, + "S": 0.13756 + }, + { + "L": -1.1947, + "M": 19.7966, + "S": 0.13774 + }, + { + "L": -1.1867, + "M": 19.8523, + "S": 0.13791 + }, + { + "L": -1.1788, + "M": 19.907, + "S": 0.13808 + }, + { + "L": -1.1708, + "M": 19.9607, + "S": 0.13825 + }, + { + "L": -1.1629, + "M": 20.0133, + "S": 0.13841 + }, + { + "L": -1.1549, + "M": 20.0648, + "S": 0.13858 + }, + { + "L": -1.147, + "M": 20.1152, + "S": 0.13873 + }, + { + "L": -1.139, + "M": 20.1644, + "S": 0.13889 + }, + { + "L": -1.1311, + "M": 20.2125, + "S": 0.13904 + }, + { + "L": -1.1232, + "M": 20.2595, + "S": 0.1392 + }, + { + "L": -1.1153, + "M": 20.3053, + "S": 0.13934 + }, + { + "L": -1.1074, + "M": 20.3499, + "S": 0.13949 + }, + { + "L": -1.0996, + "M": 20.3934, + "S": 0.13963 + }, + { + "L": -1.0917, + "M": 20.4357, + "S": 0.13977 + }, + { + "L": -1.0838, + "M": 20.4769, + "S": 0.13991 + }, + { + "L": -1.076, + "M": 20.517, + "S": 0.14005 + }, + { + "L": -1.0681, + "M": 20.556, + "S": 0.14018 + }, + { + "L": -1.0603, + "M": 20.5938, + "S": 0.14031 + }, + { + "L": -1.0525, + "M": 20.6306, + "S": 0.14044 + }, + { + "L": -1.0447, + "M": 20.6663, + "S": 0.14057 + }, + { + "L": -1.0368, + "M": 20.7008, + "S": 0.1407 + }, + { + "L": -1.029, + "M": 20.7344, + "S": 0.14082 + }, + { + "L": -1.0212, + "M": 20.7668, + "S": 0.14094 + }, + { + "L": -1.0134, + "M": 20.7982, + "S": 0.14106 + }, + { + "L": -1.0055, + "M": 20.8286, + "S": 0.14118 + }, + { + "L": -0.9977, + "M": 20.858, + "S": 0.1413 + }, + { + "L": -0.9898, + "M": 20.8863, + "S": 0.14142 + }, + { + "L": -0.9819, + "M": 20.9137, + "S": 0.14153 + }, + { + "L": -0.974, + "M": 20.9401, + "S": 0.14164 + }, + { + "L": -0.9661, + "M": 20.9656, + "S": 0.14176 + }, + { + "L": -0.9582, + "M": 20.9901, + "S": 0.14187 + }, + { + "L": -0.9503, + "M": 21.0138, + "S": 0.14198 + }, + { + "L": -0.9423, + "M": 21.0367, + "S": 0.14208 + }, + { + "L": -0.9344, + "M": 21.0587, + "S": 0.14219 + }, + { + "L": -0.9264, + "M": 21.0801, + "S": 0.1423 + }, + { + "L": -0.9184, + "M": 21.1007, + "S": 0.1424 + }, + { + "L": -0.9104, + "M": 21.1206, + "S": 0.1425 + }, + { + "L": -0.9024, + "M": 21.1399, + "S": 0.14261 + }, + { + "L": -0.8944, + "M": 21.1586, + "S": 0.14271 + }, + { + "L": -0.8863, + "M": 21.1768, + "S": 0.14281 + }, + { + "L": -0.8783, + "M": 21.1944, + "S": 0.14291 + }, + { + "L": -0.8703, + "M": 21.2116, + "S": 0.14301 + }, + { + "L": -0.8623, + "M": 21.2282, + "S": 0.14311 + }, + { + "L": -0.8542, + "M": 21.2444, + "S": 0.1432 + }, + { + "L": -0.8462, + "M": 21.2603, + "S": 0.1433 + }, + { + "L": -0.8382, + "M": 21.2757, + "S": 0.1434 + }, + { + "L": -0.8301, + "M": 21.2908, + "S": 0.14349 + }, + { + "L": -0.8221, + "M": 21.3055, + "S": 0.14359 + }, + { + "L": -0.814, + "M": 21.32, + "S": 0.14368 + }, + { + "L": -0.806, + "M": 21.3341, + "S": 0.14377 + }, + { + "L": -0.798, + "M": 21.348, + "S": 0.14386 + }, + { + "L": -0.7899, + "M": 21.3617, + "S": 0.14396 + }, + { + "L": -0.7819, + "M": 21.3752, + "S": 0.14405 + }, + { + "L": -0.7738, + "M": 21.3884, + "S": 0.14414 + }, + { + "L": -0.7658, + "M": 21.4014, + "S": 0.14423 + }, + { + "L": -0.7577, + "M": 21.4143, + "S": 0.14432 + }, + { + "L": -0.7496, + "M": 21.4269, + "S": 0.14441 + } + ] + } + } +} diff --git a/rcpchgrowth/data_tables/who_children.json b/rcpchgrowth/data_tables/who_children.json index acd79ec..2bb3d5e 100644 --- a/rcpchgrowth/data_tables/who_children.json +++ b/rcpchgrowth/data_tables/who_children.json @@ -31,7 +31,79 @@ {"decimal_age": 3.75, "interval": "months", "M": 101.6186, "L": 1, "value": 45, "S": 0.04016}, {"decimal_age": 3.8333333333333335, "interval": "months", "M": 102.1933, "L": 1, "value": 46, "S": 0.04031}, {"decimal_age": 3.9166666666666665, "interval": "months", "M": 102.7625, "L": 1, "value": 47, "S": 0.04045}, - {"decimal_age": 4.0, "interval": "months", "M": 103.3273, "L": 1, "value": 48, "S": 0.04059} + {"decimal_age": 4.0, "interval": "months", "M": 103.3273, "L": 1, "value": 48, "S": 0.04059}, + { + "decimal_age": 4.083333333, + "L": 1, + "M": 103.8886, + "S": 0.04073 + }, + { + "decimal_age": 4.166666667, + "L": 1, + "M": 104.4473, + "S": 0.04086 + }, + { + "decimal_age": 4.25, + "L": 1, + "M": 105.0041, + "S": 0.041 + }, + { + "decimal_age": 4.333333333, + "L": 1, + "M": 105.5596, + "S": 0.04113 + }, + { + "decimal_age": 4.416666667, + "L": 1, + "M": 106.1138, + "S": 0.04126 + }, + { + "decimal_age": 4.5, + "L": 1, + "M": 106.6668, + "S": 0.04139 + }, + { + "decimal_age": 4.583333333, + "L": 1, + "M": 107.2188, + "S": 0.04152 + }, + { + "decimal_age": 4.666666667, + "L": 1, + "M": 107.7697, + "S": 0.04165 + }, + { + "decimal_age": 4.75, + "L": 1, + "M": 108.3198, + "S": 0.04177 + }, + { + "decimal_age": 4.833333333, + "L": 1, + "M": 108.8689, + "S": 0.0419 + }, + { + "decimal_age": 4.916666667, + "L": 1, + "M": 109.417, + "S": 0.04202 + }, + { + "decimal_age": 5, + "L": 1, + "M": 109.9638, + "S": 0.04214 + } ], "female": [ {"decimal_age": 2.0, "interval": "months", "M": 85.7153, "L": 1, "value": 24, "S": 0.03764}, @@ -58,7 +130,79 @@ {"decimal_age": 3.75, "interval": "months", "M": 100.9238, "L": 1, "value": 45, "S": 0.0415}, {"decimal_age": 3.8333333333333335, "interval": "months", "M": 101.5337, "L": 1, "value": 46, "S": 0.04164}, {"decimal_age": 3.9166666666666665, "interval": "months", "M": 102.136, "L": 1, "value": 47, "S": 0.04179}, - {"decimal_age": 4.0, "interval": "months", "M": 102.7312, "L": 1, "value": 48, "S": 0.04193} + {"decimal_age": 4.0, "interval": "months", "M": 102.7312, "L": 1, "value": 48, "S": 0.04193}, + { + "decimal_age": 4.083333333, + "L": 1, + "M": 103.3197, + "S": 0.04206 + }, + { + "decimal_age": 4.166666667, + "L": 1, + "M": 103.9021, + "S": 0.0422 + }, + { + "decimal_age": 4.25, + "L": 1, + "M": 104.4786, + "S": 0.04233 + }, + { + "decimal_age": 4.333333333, + "L": 1, + "M": 105.0494, + "S": 0.04246 + }, + { + "decimal_age": 4.416666667, + "L": 1, + "M": 105.6148, + "S": 0.04259 + }, + { + "decimal_age": 4.5, + "L": 1, + "M": 106.1748, + "S": 0.04272 + }, + { + "decimal_age": 4.583333333, + "L": 1, + "M": 106.7295, + "S": 0.04285 + }, + { + "decimal_age": 4.666666667, + "L": 1, + "M": 107.2788, + "S": 0.04298 + }, + { + "decimal_age": 4.75, + "L": 1, + "M": 107.8227, + "S": 0.0431 + }, + { + "decimal_age": 4.833333333, + "L": 1, + "M": 108.3613, + "S": 0.04322 + }, + { + "decimal_age": 4.916666667, + "L": 1, + "M": 108.8948, + "S": 0.04334 + }, + { + "decimal_age": 5, + "L": 1, + "M": 109.4233, + "S": 0.04347 + } ] }, "weight": { @@ -87,7 +231,79 @@ {"interval": "months", "M": 15.8497, "L": -0.1028, "value": 45, "S": 0.12586, "decimal_age": 3.75}, {"interval": "months", "M": 16.0163, "L": -0.1063, "value": 46, "S": 0.12643, "decimal_age": 3.8333333333333335}, {"interval": "months", "M": 16.1827, "L": -0.1097, "value": 47, "S": 0.127, "decimal_age": 3.9166666666666665}, - {"interval": "months", "M": 16.3489, "L": -0.1131, "value": 48, "S": 0.12759, "decimal_age": 4.0} + {"interval": "months", "M": 16.3489, "L": -0.1131, "value": 48, "S": 0.12759, "decimal_age": 4.0}, + { + "decimal_age": 4.083333333, + "L": -0.1165, + "M": 16.515, + "S": 0.12819 + }, + { + "decimal_age": 4.166666667, + "L": -0.1198, + "M": 16.6811, + "S": 0.1288 + }, + { + "decimal_age": 4.25, + "L": -0.123, + "M": 16.8471, + "S": 0.12943 + }, + { + "decimal_age": 4.333333333, + "L": -0.1262, + "M": 17.0132, + "S": 0.13005 + }, + { + "decimal_age": 4.416666667, + "L": -0.1294, + "M": 17.1792, + "S": 0.13069 + }, + { + "decimal_age": 4.5, + "L": -0.1325, + "M": 17.3452, + "S": 0.13133 + }, + { + "decimal_age": 4.583333333, + "L": -0.1356, + "M": 17.5111, + "S": 0.13197 + }, + { + "decimal_age": 4.666666667, + "L": -0.1387, + "M": 17.6768, + "S": 0.13261 + }, + { + "decimal_age": 4.75, + "L": -0.1417, + "M": 17.8422, + "S": 0.13325 + }, + { + "decimal_age": 4.833333333, + "L": -0.1447, + "M": 18.0073, + "S": 0.13389 + }, + { + "decimal_age": 4.916666667, + "L": -0.1477, + "M": 18.1722, + "S": 0.13453 + }, + { + "decimal_age": 5, + "L": -0.1506, + "M": 18.3366, + "S": 0.13517 + } ], "female":[ {"interval": "months", "M": 11.4775, "L": -0.2941, "value": 24, "S": 0.1239, "decimal_age": 2.0}, @@ -114,7 +330,79 @@ {"interval": "months", "M": 15.524, "L": -0.3322, "value": 45, "S": 0.1363, "decimal_age": 3.75}, {"interval": "months", "M": 15.7064, "L": -0.3335, "value": 46, "S": 0.13716, "decimal_age": 3.8333333333333335}, {"interval": "months", "M": 15.8882, "L": -0.3348, "value": 47, "S": 0.138, "decimal_age": 3.9166666666666665}, - {"interval": "months", "M": 16.0697, "L": -0.3361, "value": 48, "S": 0.13884, "decimal_age": 4.0} + {"interval": "months", "M": 16.0697, "L": -0.3361, "value": 48, "S": 0.13884, "decimal_age": 4.0}, + { + "decimal_age": 4.083333333, + "L": -0.3374, + "M": 16.2511, + "S": 0.13968 + }, + { + "decimal_age": 4.166666667, + "L": -0.3387, + "M": 16.4322, + "S": 0.14051 + }, + { + "decimal_age": 4.25, + "L": -0.34, + "M": 16.6133, + "S": 0.14132 + }, + { + "decimal_age": 4.333333333, + "L": -0.3414, + "M": 16.7942, + "S": 0.14213 + }, + { + "decimal_age": 4.416666667, + "L": -0.3427, + "M": 16.9748, + "S": 0.14293 + }, + { + "decimal_age": 4.5, + "L": -0.344, + "M": 17.1551, + "S": 0.14371 + }, + { + "decimal_age": 4.583333333, + "L": -0.3453, + "M": 17.3347, + "S": 0.14448 + }, + { + "decimal_age": 4.666666667, + "L": -0.3466, + "M": 17.5136, + "S": 0.14525 + }, + { + "decimal_age": 4.75, + "L": -0.3479, + "M": 17.6916, + "S": 0.146 + }, + { + "decimal_age": 4.833333333, + "L": -0.3492, + "M": 17.8686, + "S": 0.14675 + }, + { + "decimal_age": 4.916666667, + "L": -0.3505, + "M": 18.0445, + "S": 0.14748 + }, + { + "decimal_age": 5, + "L": -0.3518, + "M": 18.2193, + "S": 0.14821 + } ] }, "bmi": { @@ -143,7 +431,79 @@ {"interval": "months", "M": 15.3827, "L": -0.3174, "value": 45, "S": 0.08144, "decimal_age": 3.75}, {"interval": "months", "M": 15.3652, "L": -0.3303, "value": 46, "S": 0.08174, "decimal_age": 3.8333333333333335}, {"interval": "months", "M": 15.3485, "L": -0.3452, "value": 47, "S": 0.08205, "decimal_age": 3.9166666666666665}, - {"interval": "months", "M": 15.3326, "L": -0.3622, "value": 48, "S": 0.08238, "decimal_age": 4.0} + {"interval": "months", "M": 15.3326, "L": -0.3622, "value": 48, "S": 0.08238, "decimal_age": 4.0}, + { + "decimal_age": 4.083333333, + "L": -0.3811, + "M": 15.3174, + "S": 0.08272 + }, + { + "decimal_age": 4.166666667, + "L": -0.4019, + "M": 15.3029, + "S": 0.08307 + }, + { + "decimal_age": 4.25, + "L": -0.4245, + "M": 15.2891, + "S": 0.08343 + }, + { + "decimal_age": 4.333333333, + "L": -0.4488, + "M": 15.2759, + "S": 0.0838 + }, + { + "decimal_age": 4.416666667, + "L": -0.4747, + "M": 15.2633, + "S": 0.08418 + }, + { + "decimal_age": 4.5, + "L": -0.5019, + "M": 15.2514, + "S": 0.08457 + }, + { + "decimal_age": 4.583333333, + "L": -0.5303, + "M": 15.24, + "S": 0.08496 + }, + { + "decimal_age": 4.666666667, + "L": -0.5599, + "M": 15.2291, + "S": 0.08536 + }, + { + "decimal_age": 4.75, + "L": -0.5905, + "M": 15.2188, + "S": 0.08577 + }, + { + "decimal_age": 4.833333333, + "L": -0.6223, + "M": 15.2091, + "S": 0.08617 + }, + { + "decimal_age": 4.916666667, + "L": -0.6552, + "M": 15.2, + "S": 0.08659 + }, + { + "decimal_age": 5, + "L": -0.6892, + "M": 15.1916, + "S": 0.087 + } ], "female":[ {"interval": "months", "M": 15.6881, "L": -0.5684, "value": 24, "S": 0.08454, "decimal_age": 2.0}, @@ -170,7 +530,79 @@ {"interval": "months", "M": 15.2814, "L": -0.5684, "value": 45, "S": 0.08991, "decimal_age": 3.75}, {"interval": "months", "M": 15.2732, "L": -0.5684, "value": 46, "S": 0.09051, "decimal_age": 3.8333333333333335}, {"interval": "months", "M": 15.2661, "L": -0.5684, "value": 47, "S": 0.0911, "decimal_age": 3.9166666666666665}, - {"interval": "months", "M": 15.2602, "L": -0.5684, "value": 48, "S": 0.09168, "decimal_age": 4.0} + {"interval": "months", "M": 15.2602, "L": -0.5684, "value": 48, "S": 0.09168, "decimal_age": 4.0}, + { + "decimal_age": 4.083333333, + "L": -0.5684, + "M": 15.2556, + "S": 0.09227 + }, + { + "decimal_age": 4.166666667, + "L": -0.5684, + "M": 15.2523, + "S": 0.09286 + }, + { + "decimal_age": 4.25, + "L": -0.5684, + "M": 15.2503, + "S": 0.09345 + }, + { + "decimal_age": 4.333333333, + "L": -0.5684, + "M": 15.2496, + "S": 0.09403 + }, + { + "decimal_age": 4.416666667, + "L": -0.5684, + "M": 15.2502, + "S": 0.0946 + }, + { + "decimal_age": 4.5, + "L": -0.5684, + "M": 15.2519, + "S": 0.09515 + }, + { + "decimal_age": 4.583333333, + "L": -0.5684, + "M": 15.2544, + "S": 0.09568 + }, + { + "decimal_age": 4.666666667, + "L": -0.5684, + "M": 15.2575, + "S": 0.09618 + }, + { + "decimal_age": 4.75, + "L": -0.5684, + "M": 15.2612, + "S": 0.09665 + }, + { + "decimal_age": 4.833333333, + "L": -0.5684, + "M": 15.2653, + "S": 0.09709 + }, + { + "decimal_age": 4.916666667, + "L": -0.5684, + "M": 15.2698, + "S": 0.0975 + }, + { + "decimal_age": 5, + "L": -0.5684, + "M": 15.2747, + "S": 0.09789 + } ] }, "ofc": { @@ -199,7 +631,79 @@ {"interval": "months", "M": 50.0512, "L": 1, "value": 45, "S": 0.02903, "decimal_age": 3.75}, {"interval": "months", "M": 50.1064, "L": 1, "value": 46, "S": 0.02906, "decimal_age": 3.8333333333333335}, {"interval": "months", "M": 50.1598, "L": 1, "value": 47, "S": 0.02909, "decimal_age": 3.9166666666666665}, - {"interval": "months", "M": 50.2115, "L": 1, "value": 48, "S": 0.02912, "decimal_age": 4.0} + {"interval": "months", "M": 50.2115, "L": 1, "value": 48, "S": 0.02912, "decimal_age": 4.0}, + { + "decimal_age": 4.083333333, + "L": 1, + "M": 50.2617, + "S": 0.0292 + }, + { + "decimal_age": 4.166666667, + "L": 1, + "M": 50.3105, + "S": 0.0292 + }, + { + "decimal_age": 4.25, + "L": 1, + "M": 50.3578, + "S": 0.0292 + }, + { + "decimal_age": 4.333333333, + "L": 1, + "M": 50.4039, + "S": 0.0292 + }, + { + "decimal_age": 4.416666667, + "L": 1, + "M": 50.4488, + "S": 0.0293 + }, + { + "decimal_age": 4.5, + "L": 1, + "M": 50.4926, + "S": 0.0293 + }, + { + "decimal_age": 4.583333333, + "L": 1, + "M": 50.5354, + "S": 0.0293 + }, + { + "decimal_age": 4.666666667, + "L": 1, + "M": 50.5772, + "S": 0.0294 + }, + { + "decimal_age": 4.75, + "L": 1, + "M": 50.6183, + "S": 0.0294 + }, + { + "decimal_age": 4.833333333, + "L": 1, + "M": 50.6587, + "S": 0.0294 + }, + { + "decimal_age": 4.916666667, + "L": 1, + "M": 50.6984, + "S": 0.0294 + }, + { + "decimal_age": 5, + "L": 1, + "M": 50.7375, + "S": 0.0295 + } ], "female":[ {"interval": "months", "M": 47.1822, "L": 1, "value": 24, "S": 0.02957, "decimal_age": 2.0}, @@ -226,7 +730,79 @@ {"interval": "months", "M": 49.156, "L": 1, "value": 45, "S": 0.02886, "decimal_age": 3.75}, {"interval": "months", "M": 49.2164, "L": 1, "value": 46, "S": 0.02883, "decimal_age": 3.8333333333333335}, {"interval": "months", "M": 49.2751, "L": 1, "value": 47, "S": 0.0288, "decimal_age": 3.9166666666666665}, - {"interval": "months", "M": 49.3321, "L": 1, "value": 48, "S": 0.02878, "decimal_age": 4.0} + {"interval": "months", "M": 49.3321, "L": 1, "value": 48, "S": 0.02878, "decimal_age": 4.0}, + { + "decimal_age": 4.083333333, + "L": 1, + "M": 49.3877, + "S": 0.0288 + }, + { + "decimal_age": 4.166666667, + "L": 1, + "M": 49.4419, + "S": 0.0287 + }, + { + "decimal_age": 4.25, + "L": 1, + "M": 49.4947, + "S": 0.0287 + }, + { + "decimal_age": 4.333333333, + "L": 1, + "M": 49.5464, + "S": 0.0287 + }, + { + "decimal_age": 4.416666667, + "L": 1, + "M": 49.5969, + "S": 0.0287 + }, + { + "decimal_age": 4.5, + "L": 1, + "M": 49.6464, + "S": 0.0286 + }, + { + "decimal_age": 4.583333333, + "L": 1, + "M": 49.6947, + "S": 0.0286 + }, + { + "decimal_age": 4.666666667, + "L": 1, + "M": 49.7421, + "S": 0.0286 + }, + { + "decimal_age": 4.75, + "L": 1, + "M": 49.7885, + "S": 0.0286 + }, + { + "decimal_age": 4.833333333, + "L": 1, + "M": 49.8341, + "S": 0.0285 + }, + { + "decimal_age": 4.916666667, + "L": 1, + "M": 49.8789, + "S": 0.0285 + }, + { + "decimal_age": 5, + "L": 1, + "M": 49.9229, + "S": 0.0285 + } ] } } diff --git a/rcpchgrowth/global_functions.py b/rcpchgrowth/global_functions.py index 2b97649..3072172 100644 --- a/rcpchgrowth/global_functions.py +++ b/rcpchgrowth/global_functions.py @@ -6,10 +6,11 @@ from .trisomy_21 import trisomy_21_lms_array_for_measurement_and_sex from .cdc import cdc_lms_array_for_measurement_and_sex from .trisomy_21_aap import trisomy_21_aap_lms_array_for_measurement_and_sex +from .who import who_lms_array_for_measurement_and_sex # from scipy import interpolate #see below, comment back in if swapping interpolation method # from scipy.interpolate import CubicSpline #see below, comment back in if swapping interpolation method -from .constants.reference_constants import MALE, UK_WHO, TURNERS, TRISOMY_21, BMI, CDC, TRISOMY_21_AAP, HEAD_CIRCUMFERENCE +from .constants.reference_constants import UK_WHO, TURNERS, TRISOMY_21, BMI, CDC, TRISOMY_21_AAP, WHO """Public functions""" @@ -242,8 +243,8 @@ def centile(z_score: float): try: centile = stats.norm.cdf(z_score) * 100 return centile - except TypeError as err: - raise TypeError(err) + except Exception as err: + raise Exception(err) """ @@ -585,6 +586,16 @@ def lms_value_array_for_measurement_for_reference( ) except LookupError as error: raise LookupError(error) + elif reference == WHO: + try: + lms_value_array_for_measurement = who_lms_array_for_measurement_and_sex( + age=age, + measurement_method=measurement_method, + sex=sex, + default_youngest_reference=default_youngest_reference, + ) + except LookupError as error: + raise LookupError(error) elif reference == TURNERS: try: lms_value_array_for_measurement = turner_lms_array_for_measurement_and_sex( diff --git a/rcpchgrowth/measurement.py b/rcpchgrowth/measurement.py index 7f7873d..c0c7ad0 100644 --- a/rcpchgrowth/measurement.py +++ b/rcpchgrowth/measurement.py @@ -41,7 +41,7 @@ def __init__( Additionally there are the following optional parameters: `gestation_weeks`: (integer) gestation at birth in weeks. `gestation_days`: (integer) supplemental days in addition to gestation_weeks at birth. - `reference`: ENUM refering to which reference dataset to use: ['uk-who', 'turners-syndrome', 'trisomy-21']. + `reference`: ENUM refering to which reference dataset to use: ['uk-who', 'turners-syndrome', 'trisomy-21', 'trisomy-21-aap', 'cdc', 'who']. `height_prediction`: decimal years `height_prediction_sds`: SDS for height prediction against reference `height_prediction_centile`: centile for height prediction against reference @@ -285,7 +285,7 @@ def sds_and_centile_for_measurement_method( try: chronological_measurement_centile = centile( z_score=chronological_measurement_sds) - except TypeError as err: + except Exception as err: chronological_measurement_error = "Not possible to calculate centile" chronological_measurement_centile = None try: @@ -301,7 +301,7 @@ def sds_and_centile_for_measurement_method( measurement_method=measurement_method, centile_format=centile_format ) - except TypeError as err: + except Exception as err: chronological_measurement_error = "Not possible to calculate centile" chronological_centile_band = None @@ -313,7 +313,7 @@ def sds_and_centile_for_measurement_method( try: corrected_measurement_centile = centile( z_score=corrected_measurement_sds) - except TypeError as err: + except Exception as err: corrected_measurement_error = "Not possible to calculate centile" corrected_measurement_centile = None @@ -330,7 +330,7 @@ def sds_and_centile_for_measurement_method( measurement_method=measurement_method, centile_format=centile_format ) - except TypeError as err: + except Exception as err: corrected_measurement_error = "Not possible to calculate centile" corrected_centile_band = None @@ -414,8 +414,8 @@ def __calculate_ages( self.chronological_decimal_age = None chronological_decimal_age_error = f"{err}" - # if reference is CDC, we must treat >37 week infants as term and we also stop correcting for prematurity at 2 years of age - if self.reference == CDC: + # if reference is CDC or WHO, we must treat >37 week infants as term and we also stop correcting for prematurity at 2 years of age + if self.reference == CDC or self.reference == WHO: if (self.corrected_decimal_age >= 2 and gestation_weeks < 37) or (gestation_weeks >= 37 and gestation_weeks <= 42): self.corrected_decimal_age = self.chronological_decimal_age @@ -609,7 +609,7 @@ def __validate_measurement_method( observation_value: float, corrected_decimal_age: float, sex: Literal["male", "female"], - reference: Literal['uk-who', 'turners-syndrome', 'trisomy-21', 'trisomy-21-aap', 'cdc'] = 'uk-who'): + reference: Literal['uk-who', 'turners-syndrome', 'trisomy-21', 'trisomy-21-aap', 'cdc', 'who'] = 'uk-who'): # Private method which accepts a measurement_method (height, weight, bmi or ofc), reference and age as well as observation value # and returns True if valid diff --git a/rcpchgrowth/who.py b/rcpchgrowth/who.py new file mode 100644 index 0000000..6747922 --- /dev/null +++ b/rcpchgrowth/who.py @@ -0,0 +1,194 @@ +""" +Handles WHO reference data selection +""" + +# standard imports +import json +from importlib import resources +from pathlib import Path + +# rcpch imports +from .constants import * + +""" +birth_date: date of birth +observation_date: date of observation +sex: sex (string, MALE or FEMALE) +decimal_age: chronological, decimal +corrected_age: corrected for prematurity, decimal +measurement_method: height, weight, bmi, ofc (decimal) +observation: value (float) +gestation_weeks: gestational age(weeks), integer +gestation_days: supplementary days of gestation +lms: L, M or S +reference: reference data +""" + +# load the reference data +data_directory = resources.files("rcpchgrowth.data_tables") + +data_path = Path( + data_directory, "who_infants.json") # 2 weeks to 2 years +with open(data_path) as json_file: + WHO_INFANTS_DATA = json.load(json_file) + json_file.close() + +data_path = Path( + data_directory, "who_children.json") # 2 years to 5 years +with open(data_path) as json_file: + WHO_CHILD_DATA = json.load(json_file) + json_file.close() + +data_path = Path( + data_directory, "who_2007_children.json") # 5 years to 19 years +with open(data_path) as json_file: + WHO_2007_DATA = json.load(json_file) + json_file.close() + +# public functions + + +def reference_data_absent( + age: float, + measurement_method: str, + sex: str +): + """ + Helper function. + Returns boolean + Tests presence of valid reference data for a given measurement request + + Reference data is not complete for all ages/sexes/measurements. + - Length data is not available until 25 weeks gestation, though weight date is available from 23 weeks + - There is only BMI reference data from 2 weeks of age to aged 20y + - Head circumference reference data is available from 23 weeks gestation to 17y in girls and 18y in boys + - lowest threshold is 23 weeks, upper threshold is 20y + """ + + if age < ZERO_YEARS: # lower threshold of WHO data + return True, "WHO data does not exist below term." + + if age > NINETEEN_YEARS: # upper threshold of UK90 data + return True, "WHO data does not exist above 19 years." + + if measurement_method == WEIGHT and age > TEN_YEARS: + return True, "WHO weight data does not exist in children over 10 y of age." + + if measurement_method == HEAD_CIRCUMFERENCE and age > FIVE_YEARS: + return True, "WHO head circumference data does not exist in children over 5 y of age." + + else: + return False, "" + + +def who_reference( + age: float, + default_youngest_reference: bool = False +) -> json: + """ + The purpose of this function is to choose the correct reference for calculation. + The UK-WHO standard is an unusual case because it combines two different reference sources. + - UK90 reference runs from 23 weeks to 20 y + - WHO 2006 runs from 2 weeks to 4 years + - UK90 then resumes from 4 years to 20 years + The function return the appropriate reference file as json + """ + + # # These conditionals are to select the correct reference + # if age < WHO_2006_REFERENCE_LOWER_THRESHOLD: + # # Below the range for which we have reference data, we can't provide a calculation. + # raise LookupError("There is no WHO reference data below 42 weeks gestation") + + + if age <= WHO_2006_REFERENCE_UPPER_THRESHOLD: + # Children up to and including 5 years are measured using WHO 2006 data + if (age == 2.0 and default_youngest_reference) or age < WHO_CHILD_LOWER_THRESHOLD: + # If default_youngest_reference is True, the younger reference is used to calculate values + # This is specifically for the overlap between WHO 2006 lying and standing in centile curve generation + # WHO 2006 reference is used for children below 2 years or those who are 2 years old and default_youngest_reference is True + return WHO_INFANTS_DATA + return WHO_CHILD_DATA + + elif age <= WHO_2007_REFERENCE_UPPER_THRESHOLD: + # All children over 5 years and above are measured using WHO 2007 child data + return WHO_2007_DATA + + else: + raise LookupError("There are no WHO reference data above the age of 19 years.") + + +def who_lms_array_for_measurement_and_sex( + age: float, + measurement_method: str, + sex: str, + default_youngest_reference: bool = False +) -> list: + + # selects the correct lms data array from the patchwork of references that make up UK-WHO + + try: + selected_reference = who_reference( + age=age, + default_youngest_reference=default_youngest_reference + ) + except: #  there is no reference for the age supplied + raise LookupError("There is no WHO reference for the age supplied.") + + # Check that the measurement requested has reference data at that age + + invalid_data, data_error = reference_data_absent( + age=age, + measurement_method=measurement_method, + sex=sex) + + if invalid_data: + raise LookupError(data_error) + else: + return selected_reference["measurement"][measurement_method][sex] + + +def select_reference_data_for_who_chart( + who_reference_name: str, + measurement_method: str, + sex: str, + default_youngest_reference: bool = False): + + # takes a who_reference name (see parameter constants), measurement_method and sex to return + # reference data + + if who_reference_name == WHO_2006_INFANT: + try: + who_infants_reference = who_lms_array_for_measurement_and_sex( + age=0.04, + measurement_method=measurement_method, + sex=sex, + default_youngest_reference=default_youngest_reference + ) + except: + who_infants_reference = [] + return who_infants_reference + elif who_reference_name == WHO_2006_CHILD: + try: + who_2006_children_reference = who_lms_array_for_measurement_and_sex( + age=1.0, + measurement_method=measurement_method, + sex=sex, + default_youngest_reference=default_youngest_reference # should never need younger reference in this calculation + ) + except: + who_2006_children_reference = [] + return who_2006_children_reference + elif who_reference_name == WHO_2007_CHILD: + try: + who_2007_children_reference = who_lms_array_for_measurement_and_sex( + age=6.0, + measurement_method=measurement_method, + sex=sex, + default_youngest_reference=default_youngest_reference + ) + except: + who_2007_children_reference = [] + return who_2007_children_reference + else: + raise LookupError( + f"No data found for {measurement_method} in {sex}s in {who_reference_name}") diff --git a/s/build b/s/build new file mode 100644 index 0000000..2aee2f8 --- /dev/null +++ b/s/build @@ -0,0 +1,10 @@ +#!/bin/bash + +set -v # Enable verbose mode +set -e # Exit on error + +# scripts may need to be made executable on some platforms before they can be run +# chmod +x is the command to do this on unixy systems + +# starts all docker compose services +docker-compose build \ No newline at end of file diff --git a/setup.py b/setup.py index 74ad907..425db69 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="rcpchgrowth", - version="4.2.8", + version="4.3.0", description="SDS and Centile calculations for UK Growth Data", long_description=long_description, url="https://github.com/rcpch/digital-growth-charts/blob/master/README.md",