# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 2
#     language: python
#     name: python2
# ---

# # Parameterisation of the spheroid model

# %pylab inline

# <img src="images/250px-Spheroid.svg.png">

# In Condor the geometry of a spheroid is defined by two parameters: The average diameter $d$ and the flattening $f$. The average diameter can be understood as the diameter of a sphere of identical volume. The flattening $f$ is the ratio of the semi-axes $a$ and $c$, where $c$ is measured along the symmetry axis $z$. 

# $$d=2\cdot(a^2c)^{1/3}$$

# $$f = \frac{a}{c}$$

# For internal calculations in Condor the parameters $d$ and $f$ are translated into the semi-axes $a$ and $c$ for convenience: 

# $$a=\frac{f^{1/3}d}{2}$$

# $$c = \frac{f^{-2/3}d}{2}$$ 

import condor

# +
S = condor.Source(wavelength=1.E-9, pulse_energy=1E-3, focus_diameter=1E-6)
P1 = condor.ParticleSpheroid(diameter=100E-9, flattening=0.5)

D = condor.Detector(nx=1000, ny=1000, distance=1., pixel_size=100E-6)
E = condor.Experiment(source=S, particles={"particle_spheroid": P}, detector=D)
# -

res = E.propagate()

imshow(log10(res["entry_1"]["data_1"]["data"]))

help(condor.ParticleMap(geome))

dx ©
condor.ParticleMap(geometry='custom', )

StarcoderdataJupyterScriptsDedupFiltered