Author: Paris Franz
Email: franzpl@stanford.edu

This README file describes the code for my EE367 project titled: reconstruction of attosecond x-ray temporal fields with machine learning.
This project has two experiments: (1) directly reconstructing complex temporal fields from a 2D photoelectron spectrum using a NN
(2) using a CNN to denoise the measured photoelectron spectrum

File description
===============================

project.ipynb
    contains code to train and test NN to reconstructing complex temporal fields from a 2D photoelectron spectrum
    training uses input of 52x52 simulated photoelectron spectrum and outputs a 1x601 real vector.
    the first 600 entries of output represent a complex field of form a+ib where the first 300 entries of the vector 
    are the real component (a) and the next 300 entries are the imaginary component (b).
    the last element of the vector fits an unknown variable of the image formation model, Up.
    
simulate_dataset.ipynb
    contains code to simulate a training a validation set of 
    contains code to generate clean dataset for the denoise notebook
    
recon_project.ipynb
    contains implementation of standard reconstruction method
    
torchrecon_funcs.py
    contains loss functions for MAP fitting performed in recon_project.ipynb

denoise.ipynb
    contains code to train and test DnCNN for denoising 2D photoelectron momentum spectra



Dataset
===============================

The training and validation sets used in this notebook may be generated using this code file: simulare_dataset.ipynb
OR contact Paris Franz at franzpl@stanford.edu to receive instructions for downloading

For the noisy spectrum dataset used in the denoise notebook contact Paris Franz

The notebooks recon_project.ipynb and simulate_dataset.ipynb use pre-calculated terms 
Please contact Paris Franz at franzpl@stanford.edu to receive instructions for downloading



