Folder of Psi, K and X files with corresponding MATLAB files:

LGHalfFillEF.m uses an elliptic function to produce the analytic scaled large deviations function phi at a value of lambda.

PhisL2.m loops over 5000 data points from sL2 = lambda = 0 to 50 and runs the 'LGHalfFillEF.m' code.
Outputs corresponding sL2 array ('sL2.mat') and large deviations array ('phi.mat', stored in Large Deviations Function subfolder).

PsiKX.m takes 'sL2.mat' and 'phi.mat' as inputs and loops over to output the activity and susceptibility.
Calculates the activity and susceptibility as derivatives of phi. Outputs activity as 2-D array ('K.mat', stored in Activity subfolder). 
First column of 'K.mat' is the activity and the second column is corresponding values of lambda. 
Outputs susceptibility as 2-D array ('X.mat', stored in Susceptibility subfolder). 
First column of 'X.mat' is the susceptibilty and the second column is corresponding values of lambda.

MATLAB code 'KPsiAlg.m' (Large Deviations Function and Activity subfolders) reads corresponding data files and produces activity and large deviations figures.
MATLAB code 'XAlg.m' (Susceptibility subfolder) reads corresponding data files and produces susceptibility figures.


Data files are named obsAlgL.mat

where obs is the observable of interest

      L is the system size