Skip to main content

A Python library for pulse analysis.

Project description

PyPulse

Una librería de Python para la construcción, análisis y visualización de pulsos, utilizando JAX para cálculos de alto rendimiento y GPU. Instalación

Puedes instalar la librería directamente desde el repositorio de Git:

pip install git+https://gitlab.com/jsierraj/pypulse.git

Uso

La librería pypulse ofrece una variedad de funciones para trabajar con pulsos en los dominios de la frecuencia y el tiempo, incluyendo:

Generación de diferentes formas de pulso (Gaussiano, Lorentziano, etc.).

Adición de chirp y filtros de muesca.

Conversión entre los dominios de la frecuencia y el tiempo.

Cálculo de la función de Wigner y la función de correlación tiempo-frecuencia (FTCF).

Aquí tienes un ejemplo básico de uso:

import pypulse
import jax.numpy as jnp
import matplotlib.pyplot as plt

Define parámetros del pulso

f_0 = 0.1
pulse_fwhm = 0.0441
pulse_area = 100 * jnp.pi
pulse_type = pypulse.pulses.sech

Construir el pulso en el dominio de la frecuencia

f_lim = pypulse.set_frequency_limits(f_0, pulse_fwhm, pulse_type, pulse_fwhm / 10)
f = jnp.linspace(-f_lim, f_lim, 500) + f_0
frequency_pulse = pypulse.frequency_field(f, f_0, pulse_fwhm, pulse_area, pulse_type)

Aplicar chirp

chirp_power = 1
chirp_rate = 0.1 / pulse_fwhm**2
chirped_frequency_pulse = pypulse.set_chirp(f, frequency_pulse, f_0, chirp_rate, chirp_power)

Aplicar Notch Filter

notch_frequency = f_0
notch_width = pulse_fwhm / 10
notch_type = pypulse.pulses.gaussian
notched_frequency_pulse = pypulse.notch_filter(f, frequency_pulse, notch_frequency, notch_width, notch_type)

Convertir al dominio del tiempo

t_lim = pypulse.set_time_limits(f, frequency_pulse, 0.1 / pulse_fwhm)
t = jnp.linspace(-t_lim, t_lim, 500)
temporal_pulse = pypulse.time_field(f, frequency_pulse, t)

Visualizar el pulso

plt.plot(t, jnp.abs(temporal_pulse)**2, label='Intensidad Temporal')
plt.plot(f, jnp.abs(frequency_pulse)**2, label='Espectro de Intensidad')
plt.xlabel('Eje')
plt.ylabel('Intensidad')
plt.legend()
plt.show()

Contribución

Si deseas contribuir a este proyecto, por favor, sigue las siguientes pautas:

Licencia

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypulse_unal-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypulse_unal-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pypulse_unal-0.1.0.tar.gz.

File metadata

  • Download URL: pypulse_unal-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pypulse_unal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 60e21e4d2a3ec2b3c3b21b94f1bf1871fe29f7bc7f2f2e871cf815086830014f
MD5 69e94d29cbd4b719783cef359af3d0a4
BLAKE2b-256 53863dacc9bdbd533fb91c7495c596b190bad45cadc2e45695cbc0d6809d418a

See more details on using hashes here.

File details

Details for the file pypulse_unal-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pypulse_unal-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pypulse_unal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc4616dba10269d605f764ed0495bff6d80fd39a87ab461ce4deb3fba30b52b6
MD5 00295ad280a00fc6e06ae1adcd76a273
BLAKE2b-256 600373f7a52b8b9c586ec9a58f145f7677bafdbc16ffa45a446ec7776e95e95d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page