Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryI committed Nov 4, 2024
1 parent 978d5c1 commit 01ea871
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PacletInfo.wl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PacletObject[
"Creator" -> "Kirill Vasin",
"License" -> "MIT",
"PublisherID" -> "JerryI",
"Version" -> "0.0.5",
"Version" -> "0.0.9",
"WolframVersion" -> "13+",
"PrimaryContext" -> "JerryI`TDSTools`",
"Extensions" -> {
Expand Down
96 changes: 96 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A small library for high-precision material parameter extraction from time-domai
- Fabry-Pérot deconvolution ⭐️
- Informed Automatic / semi-automatic phase unwrapping
- High precision / various approximation methods for $n$, $\kappa$, and $\alpha$ solving
- GUI widgets (available only on WLJS Notebook platform) 🌟
- Works for both thin and thick samples
- **GPU Acceleration** (OpenCL) ⭐️
- Kramers-Kronig approximation of $n$ feature (if needed)
Expand All @@ -26,6 +27,21 @@ A small library for high-precision material parameter extraction from time-domai
[An online example](https://jerryi.github.io/wl-tds-tools/Basic.html) on how to work with it.


## Time-Domain Wizard 🧙🏼‍♂️
A set of widgets, which can help you to cure phase unwrapping and material parameters extraction in batch

*available only for WLJS Notebook platform*

### Phase cure

![](./imgs/phasecure.gif)

### Material parameters

![](./imgs/matcure.gif)

See the [full video here](./imgs/wizard.mov)

## Examples of processed TDS

GaGe 0.4mm semiconductor
Expand Down Expand Up @@ -67,6 +83,7 @@ We separate the toolbox into 3 contexts:
- ``JerryI`TDSTools`Trace` `` : operates with raw time-traces.
- `` JerryI`TDSTools`Transmission` `` : constructs transmission objects from sample and reference time-traces.
- `` JerryI`TDSTools`Material` `` : extracts material parameters from transmission objects.
- `` JerryI`TDSTools`Wizard` `` : sets of helper widgets.

#### Notes on GPU Acceleration
Test were performed on Mac Air M1 (2021), where 4 cores are used for CPU calculations
Expand Down Expand Up @@ -363,6 +380,85 @@ this function will group them by `Phase` arrays (comparison by the internal refe

This also takes advantage of non-blocking execution model of OpenCL and loads all data at once.

### Time-Domain Wizards
The general interface is

```mathematica
TDSWizard[interface_, opts___][p_Promise | a_Association | traces__TDTrace | transmission__TransmissionObject] _Promise
```

It always returns `Promise`, which allows to chain different widgets together in a series

#### Options
- `InheritParameters` : default is `False`. Allows to memorize the previous parameters used and reuse them as an initial values for the rest of the batch
- all other options inherited from `TDTrace`, `TransmissionObject` and `MaterialParameters`

#### TransmissionObject interface
There is a helper to set thickness (and possible tags in the future) and built a transmission object from two `TDTrace`s. For example

```mathematica
TDSWizard[TransmissionObject, "Thickness"->Quantity[100, "Micrometers"]][sample, reference];
```

or as array

```mathematica
{sample, reference} // TDSWizard[TransmissionObject, "Thickness"->Quantity[100, "Micrometers"]];
```

or as arrays of many pairs

```mathematica
{{sample, reference}, {sample, reference}} // TDSWizard[TransmissionObject, "Thickness"->Quantity[100, "Micrometers"], "InheritProperties"->True];
```

or as a association
```mathematica
{<|"Sample"->sample, "Reference"->reference|>, <|"Sample"->sample, "Reference"->reference|>} // TDSWizard[TransmissionObject, "Thickness"->Quantity[100, "Micrometers"], "InheritProperties"->True];
```

It returns an array, which can be passed into another wizard widget for the further processsing.

#### TransmissionUnwrap interface
Provides a widget and process the phase of the transmission. It can act in two modes provided by an option `Method`

##### `Automatic`
It uses a 1 pass algorithm detecting the changes, which exeed the given threshold (can be controlled on a widget panel) and adds `2Pi` or `-2Pi` to the rest (see `TransmissionUnwrap` section above).

##### `Manual`
Acts in the same way as `Automatic`, but also allows manual edditing of the position of each branch. It helps to cure phase jumps observed on a very narrow lines.

For example
```mathematica
transmission // TDSWizard[TransmissionUnwrap];
```


#### MaterialParameters interface
It provides a widget, where you can tune thickness, gain and a global phase shift and see the changes immediately. It hevavily uses GPU for the live calculations.

For example
```mathematica
transmission // TDSWizard[MaterialParameters];
```


#### Putting all together
Using `Promise` as an input parameters, it is possible to chain those widgets

```mathematica
TDSWizard[TransmissionObject][sample, reference] // TDSWizard[TransmissionUnwrap] // TDSWizard[MaterialParameters];
```

it will print all data to new cells above the widget. You can also capture them using `Then`

```mathematica
Then[TDSWizard[TransmissionObject][sample, reference] // TDSWizard[TransmissionUnwrap] // TDSWizard[MaterialParameters], Function[results,
myResults = results;
]]
```



## Acknowledgments 💛
The work of K.V. (@JerryI) was supported by the Deutsche
Expand Down
Binary file added imgs/matcure.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/phasecure.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/wizard.mov
Binary file not shown.

0 comments on commit 01ea871

Please sign in to comment.