semvec/pypi-packages huggingface dataset:
lightprop2d 1.0.4
Light propagation in free space with fourier transform
Requires Python: >=3.6

[![pypi](https://github.com/vongostev/lightprop2d/actions/workflows/python-publish.yml/badge.svg)](https://github.com/vongostev/lightprop2d/actions/workflows/python-publish.yml)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/vongostev/lightprop2d.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vongostev/lightprop2d/context:python)

### Light propagation
Lightprop2d includes class 'Beam2D' to transform intitial field distribution
using fourier transform from x-y field profile to kx-ky spectrum.
You can use both numpy and cupy backends with `use_gpu` key of Beam2D class.

You can install it as follows
```
pip install lightprop2d==1.0.4
```

If you want to use `cupy` to accelerate calculations, you must install extra packages with a command
```
pip install lightprop2d[gpu]
```

If you want to use `pyfftw` to accelerate calculations, you must install extra packages with a command
```
pip install lightprop2d[fftw]
```

Check out the [Code Reference](docs/Reference.md) for details on the 'Beam2D' methods.


### Example 1: Random beam propagation
```python
import matplotlib.pyplot as plt
from lightprop2d import Beam2D, random_round_hole, um, nm

# All input data are in cm
# XY grid dimensions
npoints = 256
# XY grid widening
beam_radius = 25*um # 25 um
area_size = 200*um # 200 um
# Wavelength in cm
wl0 = 632*nm

beam = Beam2D(area_size, npoints, wl0, init_field_gen=random_round_hole, 
              init_gen_args=(beam_radius,))
              
plt.imshow(beam.iprofile)
plt.show()

beam.propagate(100*um)

plt.imshow(beam.iprofile)
plt.show()
```

### Funding
This work is supported by the Russian Science
Foundation under grant No. 21-12-00155.
availability 0.0.3
A custom python type for working with sparse ranges of padded timedate intervals
Requires Python: >=3.9

# Availability
Python type for working with ranges of datetimes


Use Availability to calculate ranges of datetimes.  A range consists of a start and end time that can be added or subtracted from another range.

```
availability = Availabilty([
AvailabilityRange(start_time=datetime.datetime(2022,11,1), end_time=datetime.datetime(2022,11,31,23,59,59)),
], padding_time_before=5, padding_time_after=10)

availability -= AvailabilityRange(start_time=datetime.datetime(2022,11,8), end_time=datetime.datetime(2022,11,10))
```

`pip install availibility`


### Weird Behaviors

# Jumping forward with DST

When working with availability ranges that exist in a jump, they will be converted to the "jumped time".  So 2:30 would become 3:30 since there isn't technically a 2:30 on that day.