You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

kenv

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kenv - pypi Package Compare versions

Comparing version
0.3.0.3
to
0.3.0.4
+1
-1
kenv/__init__.py

@@ -6,3 +6,3 @@ from .constants import *

__version__ = '0.3.0.3'
__version__ = '0.3.0.4'
__doc__ = """Kapchinscky ENVelope (KENV) -

@@ -9,0 +9,0 @@ solver of the Kapchinsky-Vladimirsky envelope equation"""

@@ -125,4 +125,4 @@ import numpy as np

if not element.max_field == 0:
int_f = integrate.cumtrapz(f(z_data), z_data)[-1]
int_ff = integrate.cumtrapz(f(z_data)**2, z_data)[-1]
int_f = integrate.cumulative_trapezoid(f(z_data), z_data)[-1]
int_ff = integrate.cumulative_trapezoid(f(z_data)**2, z_data)[-1]
element.length = int_f**2 / int_ff

@@ -140,3 +140,3 @@ element.field = int_ff / int_f

fill_value=(0, 0), bounds_error=False)
F_int = integrate.cumtrapz(F(z), z)
F_int = integrate.cumulative_trapezoid(F(z), z)
F_prime = interpolate.interp1d(z, F_prime, kind='cubic',

@@ -143,0 +143,0 @@ fill_value=(0, 0), bounds_error=False)

import kenv.constants as consts
import numpy as np
from kenv.beam import Particle
from scipy import interpolate, misc
from scipy import interpolate
from scipy.integrate import solve_ivp
from scipy.differentiate import derivative

@@ -28,3 +29,3 @@ __all__ = ['Sim',

Accelerator data
Particle: an instance of :any:`Particle`, optional
particle: an instance of :any:`Particle`, optional
Particle data

@@ -122,4 +123,4 @@ """

dBzdz = self.accelerator.dBzdz(z)
d2Bzdz2 = misc.derivative(
self.accelerator.dBzdz, z, dx=self.accelerator.dz, n=1)
d2Bzdz2 = derivative(
self.accelerator.dBzdz, z).df
Gz = self.accelerator.Gz(z)

@@ -133,4 +134,3 @@ Bz = Bz - d2Bzdz2 * r_corr**2 / 4

dEzdz = self.accelerator.dEzdz(z) * consts.MeV
d2Ezdz2 = misc.derivative(self.accelerator.dEzdz, z,
dx=self.accelerator.dz, n=1) * consts.MeV
d2Ezdz2 = derivative(self.accelerator.dEzdz, z).df * consts.MeV
Ez = Ez - d2Ezdz2 * r_corr**2 / 4 # row remainder

@@ -264,3 +264,3 @@ Ex = - dEzdz * x_corr / 2 + Ez * offset_xp # row remainder

Accelerator data
Particle: an instance of :any:`Particle`, optional
particle: an instance of :any:`Particle`, optional
Particle data

@@ -334,2 +334,3 @@ """

y0=X0_beam,
max_step = self.accelerator.dz,
t_eval=self.accelerator.parameter,

@@ -385,2 +386,3 @@ method=method,

y0=X0_centroid,
max_step = self.accelerator.dz,
t_eval=self.accelerator.parameter,

@@ -449,2 +451,3 @@ method=method,

y0=X0_particle,
max_step = self.accelerator.dz,
t_eval=self.accelerator.parameter,

@@ -451,0 +454,0 @@ method=method,

Metadata-Version: 2.1
Name: kenv
Version: 0.3.0.3
Summary: Kapchinscky ENVelope (KENV) - solver of the Kapchinsky-Vladimirsky envelope equation
Version: 0.3.0.4
Summary: Kapchinscky ENVelope (KENV) -
Home-page: https://github.com/fuodorov/kenv
Author: Vyacheslav Fedorov
Author-email: fuodorov1998@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Author-email: slava@fuodorov.ru
Classifier: Programming Language :: Python :: 3

@@ -15,2 +13,3 @@ Classifier: License :: OSI Approved :: MIT License

Description-Content-Type: text/markdown
License-File: LICENSE

@@ -20,2 +19,5 @@ # Kapchinsky ENVelope (KENV)

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/fuodorov/kenv/master?filepath=notebooks%2Fintroduction.ipynb)
<!-- Further development will take place in the [binp-dev/kenv](https://github.com/binp-dev/kenv) repository. -->
## The solver of Kapchinsky-Vladimirsky envelope equation for electron beam with space charge.

@@ -52,3 +54,1 @@

[Publication](http://www1.jinr.ru/Pepan_letters/panl_2020_2/13_nikifor.pdf) in Particles and Nuclei.
+8
-8

@@ -1,10 +0,10 @@

kenv/__init__.py,sha256=TaAm10kt0pl5OkpMd2aDjDWZzV_CpghXgMWFxWPN6G0,316
kenv/accelerator.py,sha256=ol2zGs7wVqpOuTZRvMIiksWiu5WRJikPTTZrHRHtLUg,21270
kenv/__init__.py,sha256=DMZA-vDfIEGeDkUZ0fBCE2ZKEiCx7PPWrl6VkZJvLSw,316
kenv/accelerator.py,sha256=0EOefXJ2rkMOxUG2GNW4llydw8L7IB_EYy_1xmd0LTU,21306
kenv/beam.py,sha256=SYBSM4CQdd8emhiKDpYo_-mscB-fCv9W-oNeiT4GzEM,6163
kenv/constants.py,sha256=B8w8kM1Iq_mZta-WotUJLISUyqJbxdLRxhFWdjcioDY,276
kenv/solver.py,sha256=BjgaMEmuDDTma9A4wWlq45teZSipX3Nkv6_12CjtMUw,17420
kenv-0.3.0.3.dist-info/LICENSE,sha256=IJI7uaJvnqcOYDc8UYVfAiBDEIoU_RbwOBp9Qr72s-8,1065
kenv-0.3.0.3.dist-info/METADATA,sha256=C1BjrB33N2HIBihG_gSydLOr7wEyPggEbHe1_cm73HA,2061
kenv-0.3.0.3.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92
kenv-0.3.0.3.dist-info/top_level.txt,sha256=3orirap0LaZ5otcyEwFA4SHIksNGlGAp48Awtf2W5U8,5
kenv-0.3.0.3.dist-info/RECORD,,
kenv/solver.py,sha256=zJEs2ss2LzDb6xblo2p4FRYPKn1maztg7Eq3ri3AQzA,17505
kenv-0.3.0.4.dist-info/LICENSE,sha256=IJI7uaJvnqcOYDc8UYVfAiBDEIoU_RbwOBp9Qr72s-8,1065
kenv-0.3.0.4.dist-info/METADATA,sha256=WPNUYQ4MhBOLf5lgA_O9FJ9Yk7ZJVdgLxW6kkEyl4Nc,2101
kenv-0.3.0.4.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
kenv-0.3.0.4.dist-info/top_level.txt,sha256=3orirap0LaZ5otcyEwFA4SHIksNGlGAp48Awtf2W5U8,5
kenv-0.3.0.4.dist-info/RECORD,,
+1
-1
Wheel-Version: 1.0
Generator: bdist_wheel (0.36.2)
Generator: setuptools (72.1.0)
Root-Is-Purelib: true
Tag: py3-none-any