Name | snsphd JSON |
Version |
0.1.5
JSON |
| download |
home_page | https://github.com/sansseriff/snsphd |
Summary | Utility and styling functions for A. Mueller's phd thesis |
upload_time | 2024-10-17 17:44:44 |
maintainer | None |
docs_url | None |
author | Andrew Mueller |
requires_python | <4.0,>=3.10 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<!-- ![SNSPHD](./snsphd.svg) -->
<!-- ! SEE THE COMMENTED OUT INSTRUCTIONS IN THE pyproject.toml FOR UPDATE INSTRUCTIONS -->
<p align="center">
<img src="https://github.com/sansseriff/snsphd/raw/master/snsphd.svg" alt="SNSPHD" width="400"/>
</p>
This is a python package of utility and styling functions used for:
<h3 style="text-align: center; color: lightblue;"><em>Optimization Techniques for Single Photon Detection and Quantum Optics</em></h3>
<h5 style="text-align: center; white-space: pre-line;">A Thesis by
Andrew Mueller</h5>
<h5 style="text-align: center; white-space: pre-line;">In Partial Fulfillment of the Requirements for the
Degree of Doctor of Philosophy in Applied Physics</h5>
This packages is made of 6 parts:
## viz
- Styling related functions and presets. This is used to give matplotlib and bokeh plots a custom style as seen in the thesis.
- the `viz.save_light_dark_all()` function is used to save light-mode and dark-mode compatible figures, as well as a .pdf version of use in latex documents. It does not change color properties via rcParams, and therefore does not require changes to code before or involved with the initialization of a figure. `viz.save_light_dark_all()` just has to run at the end of a script or notebook cell, the same way `plt.savefig()` would be used. It traverses the figure DOM and modifies styling of a number of elements including lines, errorbars, legends, `imshow()` images, and other things.
<p align="center">
<img src="https://raw.githubusercontent.com/sansseriff/snsphd/949a6def8f99f3e120686f11b8019ca0b0ebbf18/light_dark.svg" alt="light_dark" width="700"/>
</p>
## obj
- Includes the `DataObj` class used for exporting and importing python classes as structured json files. Objects containing numpy arrays are exported using `orjson`, and re-cast into numpy arrays on import. The library follows some basic rules in order to determine what sub-objects should be converted to numpy arrays during import. Complex arrays may not import correctly. The library supports export and import of nested `DataObj` classes. When the json is parsed during import, structures that who's keys include the suffix "_do" are converted to `DataObj` classes in a recursive pattern.
- `DataObj` classes are not supported by a rigid schema, which has advantages and disadvantages. The use of the "_do" suffix could lead to unwanted name-collision behavior, and the import process may fail on certain types of nested arrays, especially those that contain datatypes that cannot be converted to numpy arrays.
- For more rigid control of datatypes and object schema, a library like [pydantic](https://docs.pydantic.dev/latest/) in concert with [datamodel code generator](https://github.com/koxudaxi/datamodel-code-generator) may be more useful.
## layout
- Contains the `bisect()` function and related utilities that are used to define complex matplotlib figure layouts. More information is included in the main thesis.
## hist
- A collection of various utilities that help with the analysis of histograms and instrument response functions, like the jitter profile of Superconducting Nanowire Single Photon Detectors. These include tools for fitting histograms to curves, and finding their width at different percentages of maximum height.
## help
- Various utility functions of general usefulness. The `prinfo` functions is handy for easy debugging:
```python
my_variable = 3
my_other_variable = "hello"
prinfo(my_variable, my_other_variable)
```
prints:
my_variable = 3,
my_other_variable = "hello"
## clock
- Contains various versions of numba-accelerated clock analysis functions. These apply phase locked loops to a series of clock time measurements in order to cancel clock jitter.
Raw data
{
"_id": null,
"home_page": "https://github.com/sansseriff/snsphd",
"name": "snsphd",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Andrew Mueller",
"author_email": "andrewstermueller@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bd/3e/abe1b47c3785e968aa35046fb937cfe0529d88a4b63eb837d9904ef84f5f/snsphd-0.1.5.tar.gz",
"platform": null,
"description": "<!-- ![SNSPHD](./snsphd.svg) -->\n<!-- ! SEE THE COMMENTED OUT INSTRUCTIONS IN THE pyproject.toml FOR UPDATE INSTRUCTIONS -->\n\n<p align=\"center\">\n <img src=\"https://github.com/sansseriff/snsphd/raw/master/snsphd.svg\" alt=\"SNSPHD\" width=\"400\"/>\n</p>\n\n\nThis is a python package of utility and styling functions used for:\n\n<h3 style=\"text-align: center; color: lightblue;\"><em>Optimization Techniques for Single Photon Detection and Quantum Optics</em></h3>\n\n\n<h5 style=\"text-align: center; white-space: pre-line;\">A Thesis by \nAndrew Mueller</h5>\n\n<h5 style=\"text-align: center; white-space: pre-line;\">In Partial Fulfillment of the Requirements for the \nDegree of Doctor of Philosophy in Applied Physics</h5>\n\n\nThis packages is made of 6 parts:\n\n## viz\n- Styling related functions and presets. This is used to give matplotlib and bokeh plots a custom style as seen in the thesis. \n- the `viz.save_light_dark_all()` function is used to save light-mode and dark-mode compatible figures, as well as a .pdf version of use in latex documents. It does not change color properties via rcParams, and therefore does not require changes to code before or involved with the initialization of a figure. `viz.save_light_dark_all()` just has to run at the end of a script or notebook cell, the same way `plt.savefig()` would be used. It traverses the figure DOM and modifies styling of a number of elements including lines, errorbars, legends, `imshow()` images, and other things.\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/sansseriff/snsphd/949a6def8f99f3e120686f11b8019ca0b0ebbf18/light_dark.svg\" alt=\"light_dark\" width=\"700\"/>\n</p>\n\n## obj\n- Includes the `DataObj` class used for exporting and importing python classes as structured json files. Objects containing numpy arrays are exported using `orjson`, and re-cast into numpy arrays on import. The library follows some basic rules in order to determine what sub-objects should be converted to numpy arrays during import. Complex arrays may not import correctly. The library supports export and import of nested `DataObj` classes. When the json is parsed during import, structures that who's keys include the suffix \"_do\" are converted to `DataObj` classes in a recursive pattern. \n\n- `DataObj` classes are not supported by a rigid schema, which has advantages and disadvantages. The use of the \"_do\" suffix could lead to unwanted name-collision behavior, and the import process may fail on certain types of nested arrays, especially those that contain datatypes that cannot be converted to numpy arrays. \n\n- For more rigid control of datatypes and object schema, a library like [pydantic](https://docs.pydantic.dev/latest/) in concert with [datamodel code generator](https://github.com/koxudaxi/datamodel-code-generator) may be more useful. \n\n\n## layout\n- Contains the `bisect()` function and related utilities that are used to define complex matplotlib figure layouts. More information is included in the main thesis. \n\n## hist\n- A collection of various utilities that help with the analysis of histograms and instrument response functions, like the jitter profile of Superconducting Nanowire Single Photon Detectors. These include tools for fitting histograms to curves, and finding their width at different percentages of maximum height. \n\n## help\n- Various utility functions of general usefulness. The `prinfo` functions is handy for easy debugging:\n\n```python\nmy_variable = 3\nmy_other_variable = \"hello\"\nprinfo(my_variable, my_other_variable)\n```\nprints:\n\n my_variable = 3, \n my_other_variable = \"hello\"\n\n## clock\n- Contains various versions of numba-accelerated clock analysis functions. These apply phase locked loops to a series of clock time measurements in order to cancel clock jitter. ",
"bugtrack_url": null,
"license": "MIT",
"summary": "Utility and styling functions for A. Mueller's phd thesis",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/sansseriff/snsphd",
"Repository": "https://github.com/sansseriff/snsphd"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "374e20fa256e1462d51a3d26a38e10f64dddcdcdd22f1479816a532c1eb34511",
"md5": "9f32241c009ac89091b79fdd25b1c16d",
"sha256": "b7a21fab359f3227e65b18bd2ede1ab726b5943b243b94c301a16cbe901bca37"
},
"downloads": -1,
"filename": "snsphd-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9f32241c009ac89091b79fdd25b1c16d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 24211,
"upload_time": "2024-10-17T17:44:43",
"upload_time_iso_8601": "2024-10-17T17:44:43.360045Z",
"url": "https://files.pythonhosted.org/packages/37/4e/20fa256e1462d51a3d26a38e10f64dddcdcdd22f1479816a532c1eb34511/snsphd-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bd3eabe1b47c3785e968aa35046fb937cfe0529d88a4b63eb837d9904ef84f5f",
"md5": "4cfeb8a8d4639f83ff86853d19cf6df1",
"sha256": "7c7352cb6539985dce1a712a94a771e7e2a1694938ebd76925a573a0e56314ae"
},
"downloads": -1,
"filename": "snsphd-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "4cfeb8a8d4639f83ff86853d19cf6df1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 23968,
"upload_time": "2024-10-17T17:44:44",
"upload_time_iso_8601": "2024-10-17T17:44:44.849321Z",
"url": "https://files.pythonhosted.org/packages/bd/3e/abe1b47c3785e968aa35046fb937cfe0529d88a4b63eb837d9904ef84f5f/snsphd-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-17 17:44:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sansseriff",
"github_project": "snsphd",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "snsphd"
}