* SPICE netlist
R1 N001 Input_3PE 1k
R2 Out_PreAmp N001 10k
V2 N002 0 5
V3 0 N003 5
XU1 0 N001 N002 N003 Out_PreAmp level1 Avol=1Meg GBW=500Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
R3 N005 N006 500
R4 Out_FS N005 25k
V4 N007 0 5
V5 0 N008 5
XU2 0 N005 N007 N008 Out_FS level1 Avol=1Meg GBW=800Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
V1 Input_1PE 0 PWL file=C:\Users\smili\Downloads\ITEDA\Drive\photon_data_1_photoequivalent.txt
R5 0 Out_FS 100k
C1 N006 Out_PreAmp 10n
C2 Out_FS N005 100f
V6 Input_2PE 0 PWL file=C:\Users\smili\Downloads\ITEDA\Drive\photon_data_2_photoequivalent.txt
R6 Out_PreAmp 0 10k
V7 Input_3PE 0 PWL file=C:\Users\smili\Downloads\ITEDA\Drive\photon_data_3_photoequivalent.txt
S1 Out 0 Out_FS 0 SW
V9 N004 0 300m
R7 N004 Out 10k
.tran 160n
.step param vt 315m 325m 0.1m
.meas Ones PARAM floor(widthpulse/(3.125e-9))
.meas TRAN widthpulse TRIG V(out_fs)=vt RISE=1 TARG V(out_fs)=vt FALL=1

* LTspice schematic (.asc)
Version 4
SHEET 1 3424 1456
WIRE -608 -712 -720 -712
WIRE -400 -712 -528 -712
WIRE -512 -568 -576 -568
WIRE -880 -536 -1056 -536
WIRE -768 -536 -800 -536
WIRE -720 -536 -720 -712
WIRE -720 -536 -768 -536
WIRE -576 -536 -576 -568
WIRE -512 -536 -512 -568
WIRE -1712 -488 -1712 -568
WIRE -576 -408 -576 -456
WIRE -768 -392 -768 -536
WIRE -608 -392 -768 -392
WIRE -400 -376 -400 -712
WIRE -400 -376 -544 -376
WIRE -304 -376 -400 -376
WIRE -208 -376 -208 -488
WIRE -208 -376 -304 -376
WIRE -608 -360 -752 -360
WIRE -1712 -344 -1712 -408
WIRE -304 -328 -304 -376
WIRE -752 -280 -752 -360
WIRE -576 -248 -576 -344
WIRE -304 -216 -304 -248
WIRE 1440 -216 1424 -216
WIRE 1568 -216 1520 -216
WIRE 1712 -216 1648 -216
WIRE 1712 -200 1712 -216
WIRE 1424 -168 1424 -216
WIRE 1424 -168 1376 -168
WIRE -576 -120 -576 -168
WIRE 1376 -120 1168 -120
WIRE 1424 -120 1424 -168
WIRE 1376 -104 1376 -120
WIRE -1712 -40 -1712 -120
WIRE 1376 -40 1376 -56
WIRE 1376 -40 1168 -40
WIRE 1424 8 1424 -40
WIRE -1712 104 -1712 40
WIRE -656 136 -768 136
WIRE -448 136 -576 136
WIRE -768 232 -768 136
WIRE -656 232 -768 232
WIRE -448 232 -448 136
WIRE -448 232 -592 232
WIRE -560 280 -624 280
WIRE -1024 312 -1024 -40
WIRE -928 312 -960 312
WIRE -816 312 -848 312
WIRE -768 312 -768 232
WIRE -768 312 -816 312
WIRE -624 312 -624 280
WIRE -560 312 -560 280
WIRE -624 440 -624 392
WIRE -816 456 -816 312
WIRE -656 456 -816 456
WIRE -1712 472 -1712 392
WIRE -448 472 -448 232
WIRE -448 472 -592 472
WIRE -304 472 -304 360
WIRE -304 472 -448 472
WIRE -208 472 -304 472
WIRE 0 472 -128 472
WIRE -656 488 -800 488
WIRE 0 504 0 472
WIRE -800 568 -800 488
WIRE -624 600 -624 504
WIRE -1712 616 -1712 552
WIRE -624 728 -624 680
FLAG -576 -120 0
FLAG -512 -536 0
FLAG -1712 616 0
FLAG -752 -280 0
FLAG -624 728 0
FLAG -560 312 0
FLAG -800 568 0
FLAG -208 -488 Out_PreAmp
FLAG -304 360 Out_FS
FLAG 0 504 0
FLAG -1024 -40 Out_PreAmp
FLAG -1712 392 Input_1PE
FLAG -1712 104 0
FLAG -1712 -120 Input_2PE
FLAG -1056 -536 Input_3PE
FLAG -304 -216 0
FLAG -1712 -344 0
FLAG -1712 -568 Input_3PE
FLAG 1424 8 0
FLAG 1712 -200 0
FLAG 1376 -168 Out
FLAG 1168 -120 0
FLAG 1168 -40 Out_FS
SYMBOL res -784 -552 R90
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL res -512 -728 R90
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL voltage -576 -440 R180
SYMATTR InstName V2
SYMATTR Value 5
SYMBOL voltage -576 -152 R180
SYMATTR InstName V3
SYMATTR Value 5
SYMBOL OpAmps\\UniversalOpAmp1 -576 -376 R0
SYMATTR InstName U1
SYMATTR Value2 Avol=1Meg GBW=500Meg Vos=0
SYMBOL res -832 296 R90
SYMATTR InstName R3
SYMATTR Value 500
SYMBOL res -560 120 R90
SYMATTR InstName R4
SYMATTR Value 25k
SYMBOL voltage -624 408 R180
SYMATTR InstName V4
SYMATTR Value 5
SYMBOL voltage -624 696 R180
SYMATTR InstName V5
SYMATTR Value 5
SYMBOL OpAmps\\UniversalOpAmp1 -624 472 R0
SYMATTR InstName U2
SYMATTR Value2 Avol=1Meg GBW=800Meg Vos=0
SYMBOL voltage -1712 456 R0
SYMATTR Value PWL file=C:\Users\smili\Downloads\ITEDA\Drive\photon_data_1_photoequivalent.txt
SYMATTR InstName V1
SYMBOL res -112 456 R90
SYMATTR InstName R5
SYMATTR Value 100k
SYMBOL cap -960 296 R90
SYMATTR InstName C1
SYMATTR Value 10n
SYMBOL cap -592 216 R90
SYMATTR InstName C2
SYMATTR Value 100f
SYMBOL voltage -1712 -56 R0
SYMATTR Value PWL file=C:\Users\smili\Downloads\ITEDA\Drive\photon_data_2_photoequivalent.txt
SYMATTR InstName V6
SYMBOL res -320 -344 R0
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL voltage -1712 -504 R0
SYMATTR Value PWL file=C:\Users\smili\Downloads\ITEDA\Drive\photon_data_3_photoequivalent.txt
SYMATTR InstName V7
SYMBOL sw 1424 -136 R0
SYMATTR InstName S1
SYMBOL voltage 1552 -216 R270
SYMATTR InstName V9
SYMATTR Value 300m
SYMBOL res 1536 -232 R90
SYMATTR InstName R7
SYMATTR Value 10k