Skip to content

4. Demo

Santiago Guerrero-Higareda edited this page Apr 2, 2025 · 22 revisions

Two absorbance measurements (A1 and A2) of the same 15 SPF sunscreen will be used for this demo (demo_beforeUVexposure.csv and demo_afterUVexposure.csv).

  1. First download the files and import the module
import photoprotectionpy as pppy
import numpy as np
import pandas as pd
  1. Import the data from the csv file
data_before = np.array(pd.read_csv(demo_beforeUVexposure.csv))
data_after = np.array(pd.read_csv(demo_afterUVexposure.csv))
  1. Initial in vitro SPF with the ispf module
SPFi = pppy.ispf(data_before, integration='trapz')

This results in an SPFiA1 ≅ 15.78 and SPFiA1 ≅ 15.38. 4. C value determination with the adjspf module

C = pppy.adjspf(data_before, mode = 'calc', values = [15], batch = True)

Or, if batch = false:

C = pppy.adjspf(data_before, mode = 'calc', values = [15, 15], batch = False)

Clone this wiki locally