GENERAL INFORMATION

Title of Dataset: PPPP beam profiles and measured Shack Hartmann slopes

Author/Principal Investigator Information
Name: Nazim Ali Bharmal
ORCID: 0000-0003-3708-2153 
Institution: Durham University
Address: Physics, Lower Mountjoy, South Road, Durham DH1 3LE
Email: n.a.bharmal@durham.ac.uk

Author/Associate or Co-investigator Information
Name: Carlos Gonzalez Gutierrez
ORCID:
Institution: University of Oviedo
Address: C/Independencia 13, 33004 Oviedo, Spain
Email: gonzalezgcarlos@uniovi.es

Date of data collection: 2021-08-09 to -24

Geographic location of data collection:
        PPPPP experiment, Durham (see
        https://doi.org/10.1117/1.JATIS.5.2.029002)

Information about funding sources that supported the collection of the data:
        UKRI-STFC grant ST/T000244/1


SHARING/ACCESS INFORMATION

Licenses/restrictions placed on the data:
        CC BY-SA, https://creativecommons.org/licenses/by-sa/4.0/

Links to publications that cite or use the data: <insert DOI>

*TODO INSERT DOI*

Links to other publicly accessible locations of the data: None

Links/relationships to ancillary data sets: None

Was data derived from another source? No

Recommended citation for this dataset:
        Bharmal N.A., Gonzalez Gutierrez C., Morris T.M.,
        de Cos Juez F.J. (2023): PPPP beam profiles and measured Shack Hartmann slopes from the PPPPP
        experiment.  Durham University.  (dataset)  DOI: http://doi.org/10.15128/r2np193923h 



DATA & FILE OVERVIEW

Folder List:

Each folder consists of a run with a different gain but an identical number
of instances of data recorded.

        Date              Name         Length   Gain
        ----------------------------------------------
        2021-08-09         DS_5        20000    0.1
        2021-08-10         DS_6        20000    0.325
        2021-08-11         DS_7        20000    0.55
        2021-08-12         DS_8        20000    0.775
        2021-08-13         DS_9        20000    1.0
        2021-08-14        DS_10        20000    0.1
        2021-08-15        DS_11        20000    0.325
        2021-08-20        DS_13        20000    0.55
        2021-08-23        DS_14        20000    0.775
        2021-08-24        DS_15        20000    1.0

 Within each folder, file names follow this template,

        Name                                 Description
        ------------------------------------------------------------------------
        HHhMM_slopes.fits               SH WFS slopes (frames averaged) per
                                        instance
        HHhMM_wfe.fits                  Calculated wavefront error for each
                                        instance, arbitrary units (uncalibrated)
        HHhMM_References.fits           Reference images for P1, P2, SH WFS
                                        slopes
        HHhMM_aberrations.fits          Calculated aberration amplitudes of
                                        Zernike polynomials, following Noll 1982
        HHhMM_beamProfile1.fits         P1 beamprofiles (frames averaged) per
                                        instance
        HHhMM_beamProfile2.fits         P2 beamprofiles (frames averaged) per
                                        instance
        HHhMM_actuators.fits            Actuators sent for each instance
        HHhMM_variables.txt             Configuration variables for the script, 
                                        'frameNos' represent the averaging from
                                        frames for each instance of this run.
        HHhMM_intensities.fits          P1 and P2 camera total image intensities
                                        pre-normalisation
        HHhMM_ppppp-ph29-0.6.log        Log from script, for debugging purposes
        HHhMM_variances.png             Graphical overview of data, quicklook

 Finally, there is an additional data file,

        gDARCM_i.pickle.npy             Wavefront reconstruction matrix

 which is used to compute the wavefront error from the slopes.
 The FITS files are written using a custom (Python 2.x) code but are consistent
with the FITS standard. The npy file is a version 1.0 numpy array pickle.

Relationship between files, if important: 

Additional related data collected that was not included in the current data
 package: None

Are there multiple versions of the dataset? No

METHODOLOGICAL INFORMATION

Description of methods used for collection/generation of data: An automated
 script (written in Python 2.7, available from NAB) ran the experiment, PPPPP,
which had three cameras, identically controlled via three instances of the DARC
RTC, and one DM, controlled via a separate computer that interpreted commands
sent remotely from the script. Configuration files for DARC are also available
(from NAB).

Methods for processing the data: All data as provided was collected by the
 cameras in the PPPPP experiment.

Instrument- or software-specific information needed to interpret the data: data
 are all stored as FITS files, readable with the astropy.io.fits Python library
 and so compatible with standard libraries.

Standards and calibration information, if appropriate: None

Environmental/experimental conditions: STP, during night hours to remove
 effects of ambient vibrations

Describe any quality-assurance procedures performed on the data: The
 HHhMM_variances.png files are plots showing the variability of each frame for
 the injected aberrations on the DM, the measured WFS slopes, and the measured
 intensity in the PPPP cameras (averaged)

People involved with sample collection, processing, analysis and/or submission:
 NAB, machine learning led by CGG but not included in this dataset


DATA-SPECIFIC INFORMATION FOR .fits FILES: 

        HHhMM_References.fits
                There are three HDUs, the first is the reference image from the
                P1 camera:
                 NAXIS   = 2
                 DESC    = Centered reference P1, cropped from the full image
                 NAXIS1  = 300
                 NAXIS2  = 300
                 RADII   = Fitted radii for y-, then x-binning                   
                 OFFSETS = Fitted centre offset for y-, then x-binning         
                 SCALES  = Fitted scaling for y-, then x-binning                 
                 LINEARS = Fitted linear component for y-, then x-binning      
                 FRAMEN  = 10
                the second is the reference image from the P2 camera:
                 (as above)
                and the third is the reference slopes vector from the WFS:
                 NAXIS   = 1                                                                     
                 NAXIS1  = 74                                                                    
                 FRAMEN  = 50, frames averaged
                 DESC    = Centroid references

 Each .fits file below is structured as pairs of HDUs. The first of the pair is
described below and represents a subset of the instances for the relevant data
stored in the pair. The second of the pair represents the timing for each
instance of the data subset. Hence a pair is (data HDU, timing HDU). All the
pairs together represent all the instances, and therefore the complete data for
that run of the experiment.
Below is described the structure of the first extension, repeated until the
dataset is complete. (The exception is for the intensities where the data is
not stored as pairs of HDUs but instead singly, and so without timing.) The
timing HDU in a pair has the same length as the data HDU's last axis.

        HHhMM_beamProfile1.fits
                   NAXIS = 3
                    DESC = Centred beam-profile P1, cropped from the full image
                  NAXIS1 = 300 # vertical dimension
                  NAXIS2 = 300 # horizontal dimension
                  NAXIS3 = 249 # frame number

        HHhMM_beamProfile2.fits
                As 'beamProfile2' but for camera P2

        HHhMM_intensities.fits
                   NAXIS = 2
                    DESC = P1 and P2 intensities, pre-normalisation
                  NAXIS1 = 2
                  NAXIS2 = 249 # frame number

        HHhMM_aberrations.fits
                   NAXIS = 2
                    DESC = Aberrations
                  NAXIS1 = 12 # Zernike polynomial (Noll ordering) index, from
                           Z4 inclusive
                  NAXIS2 = 249

        HHhMM_slopes.fits
                   NAXIS = 2
                    DESC = Slopes
                  NAXIS1 = 74 # slope index, arranged as XYXY...XYXY
                  NAXIS2 = 249

        HHhMM_actuators.fits
                   NAXIS = 2
                    DESC = Actuators
		  NAXIS1 = 40 # DM actuator index, not including the tip/tilt
                           actuators
                  NAXIS2 = 249

        HHhMM_wfe.fits
                   NAXIS = 1
                    DESC = Wavefront Error, arb. units, reconstruction using a
                           synthetic IMX and Tikhonov regularisation, stored as 
                           `gDARCM_i.pickle.npy'
                  NAXIS1 = 249

