pychangcooper package

Submodules

pychangcooper.chang_cooper module

class pychangcooper.chang_cooper.ChangCooper(n_grid_points=300, max_grid=100000.0, delta_t=1.0, initial_distribution=None, store_progress=False)[source]

Bases: object

current_time

delta_t * n_iterations

Type:The current time
delta_j

the delta_js

grid

The energy grid

half_grid

The half energy grid

history

The history of the solution

n

The current solution

n_iterations

The number of iterations solved for

plot_current_distribution(ax=None, **kwargs)[source]
plot_evolution(cmap='magma', skip=1, show_legend=False, alpha=0.9, show_final=False, show_initial=False, ax=None)[source]

plot th evolution of the electrons

Parameters:
  • cmap – cmap to use
  • skip – number of elements to skip
  • show_legend – show a legend
  • alpha – the transparency
  • show_final – label the final solution
  • show_initial – show the initial distribution
  • ax – the ax to plot to
Returns:

plot_initial_distribution(ax=None, **kwargs)[source]

plot the initial distribution of the electrons

Parameters:
  • ax – ax to plot to
  • kwargs – mpl kwargs
Returns:

fig

reset()[source]

reset the solver to the initial electron distribution

Returns:
solve_time_step()[source]

Solve for the next time step.

pychangcooper.chang_cooper.log_grid_generator(n_steps, grid_max)[source]

pychangcooper.synchrotron_emission module

pychangcooper.tridiagonal_solver module

class pychangcooper.tridiagonal_solver.TridiagonalSolver(a, b, c)[source]

Bases: object

solve(d_j)[source]
pychangcooper.tridiagonal_solver.jit_backward_sweep[source]
pychangcooper.tridiagonal_solver.jit_forward_sweep[source]

Module contents