semvec/pypi-packages huggingface dataset:
rcwa-tlv 0.0.3
RCWA solver for photonic devices
Requires Python: >=3.8.1


# RCWA (Rigorous Coupled Wave Analysis)

<img src=docs/images/Gemini_Generated_Image_z1rgs1z1rgs1z1rg.jpeg width=50% height=50%>

## Installation  

Regular user:  
* `pip install rcwa_tlv`  

Developer:  
* clone repository:  
  `git clone https://github.com/Victthor/rcwa_tlv.git`
* install locally:  
  `pip install -e .`

## Usage  
[base_example.py](examples%2Fbase_example.py)  
```python
import numpy as np

from rcwa_tlv import RCWA, Device, Source
from rcwa_tlv.devices.shapes import add_circle

n_height = 400
n_width = 400
period = 900
nm2pixels = n_width / period

# reflexion region
er1 = 1.5 ** 2
ur1 = 1.0

# transmission region
er2 = 1.0
ur2 = 1.0

layer = {
    'er': 1.0 * np.ones((n_height, n_width)),
    'length_z': 21,
}

layers = [layer]
add_circle(layers[0]['er'], (n_height // 2, n_width // 2), 300 * nm2pixels, er1)

device = Device(layers, period_x=period, period_y=period, er1=1.445 ** 2, ur1=1.0, er2=1.0, ur2=1.0, p=11, q=11)
source = Source(0.0, 0.0, 700, 1., 0.)

rcwa = RCWA(device, source, gamma=0.7, apply_nv=False, dtype=np.float32)

result = rcwa()

```

## References:
https://doi.org/10.1364/JOSA.71.000811
kobo-highlights-extractor 0.1.0
A package to extract highlights from kobo books
Requires Python: >=3.11
Keywords: kobo, ereader

# Description

With this script you can get the highlights from Kobo reader using the sqlite file. The reason I made it is because when you export the highlights, a basic information as the page where are located is not exported. Oh, thanks, Kobo, for this useless option. When I highlight something usually I want to reference in other place, so maybe I need to search in the original content to expand the context.

## Basic Usage

To run the basic usage, you just need to clone this repo and follow the next steps:

1. Export the `KoboReader.sqlite` file from your Kobo and place it in the root path where this code has been downloaded.
2. Run `pip install .` or `pip install --upgrade .`
3. Run `python app.py`

All the highlights will be extracted and saved in an .md file with the name of the book, into a `highlights` folder, and with the follow structure:

```
# Title

## Chapter 1

Lorem Ipsum

Progress: Position progress on chapter
Date: date when the highlight was highlighted

---

Lorem Ipsum2

Progress: Position progress on chapter
Date: date when the highlight was highlighted

## Chapter B

Lorem Ipsum

Note: A note 

Progress: Position progress on chapter
Date: date when the highlight was highlighted

...
```
## Advanced usage
This script accepts some parameters to use in a more advanced usage:

- `--db-file`: if your .sqlite file has another name, you can specify it with this param
- `--template`: if you want to use another template, you can pass it using this param. Please, use the template at the end as example to know what variables you can use.
- `--highlights-path`: if you want to put the exported highlights in another place, you can specify it with this param.

### Basic template
```md
# {{ book_data['book_title'] }}

{% for chapter in book_data['chapters'] %}

## {{ chapter['chapter_title'] }}

{% for highlight in chapter['highlights'] %}

> {{ highlight['highlight'].strip() }}

{% if highlight['note'] is not none and highlight['note'] != "" %}
Note: {{ highlight['note'] }}
{% endif %}

Progress: {{ highlight['chapter_progress'] }} %
Date: {{ highlight['date'] }}

---

{% endfor %}
{% endfor %}
```