-
Notifications
You must be signed in to change notification settings - Fork 0
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).
- First download the files and import the module
import photoprotectionpy as pppy
import numpy as np
import pandas as pd
- 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))
- Initial in vitro SPF with the
ispfmodule
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)