Skip to content

lhenkelm/MLHEP2020-black-box

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XFEL

XFEL accelerator tuning competition.

Installation

via git

git clone [email protected]:lambda-hse/mlhep-2020-fel-competition.git fel
cd fel
pip install -e .

This package can be easily updated via git pull (due to -e option).

one liner

pip install git+https://gitlab.com/lambda-hse/mlhep-2020-fel-competition.git

Example usage

import numpy as np
from fel import SASE, random_beam, random_geometry

hidden_rng = np.random.RandomState(1111)

sase = SASE(random_beam(hidden_rng), random_geometry(hidden_rng))
epsilon = 1e-12

objective = lambda x: np.log(1e-3) - np.log(sase.rho_int(x) + epsilon)

bounds = np.stack([
    -2 * np.ones(sase.ndim()),
    2 * np.ones(sase.ndim())
], axis=1)

x0 = np.zeros(sase.ndim())

About

A competition for the MLHEP 2020 summer school.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 87.3%
  • Python 12.7%