使用步长为0.1 nm 的标准CIE色度匹配图进行光谱波长计算
Project description
# 依赖库
numpy
pandas
matpltlib
# 介绍
该库使用步长为0.1 nm 的标准CIE色度匹配图进行光谱波长计算。
# 使用教程
work(file, start=380, end=780, draw=True, statr_line=8)
file文件须为 txt 文档,格式如下:
[nm] ;[counts] ;[counts] ;[counts]
143.968; 270.000; 0.000; 0.000
144.581; 295.000; 0.000; 0.000
145.194; 261.000; 0.000; 0.000
145.807; 292.429; 0.000; 0.000
# 参数使用规则
file:你的txt数据存储文件
start:计算波谱的起点——默认为 390nm。自定义值必须在区间 [390, 830]中,默认为390
end: 计算波谱的终点——默认为830nm。 自定义值必须在区间 [390, 830]中, 默认为830
draw:是否绘制展示图,默认为True
start_line:读取txt文档数据的起点,默认为8。如果你的txt文档有效数据是从第1行开始的,则将该参数设置为0。
# 返回的参数 x: CIE xy色度图的x值
y: CIE xy色度图的y值
result_lambda:你的波谱计算得到的波长
Lambda:CIE1931色彩空间色度图波长,步长为0.1nm —— array。 范围为 390——830
Lambda_x:CIE1931色彩空间色度图各波长对应的x —— array
Lambda_y:CIE1931色彩空间色度图各波长对应的y —— array
# 运行文件
运行需要两个关键文件,需要在下面网址去下载;
链接:https://pan.baidu.com/s/1CNjeEJy5hTK4IbnActwj2w 提取码:cg2q
将里面的两个文件放在你自己代码的同级目录下。然后运行如下代码即可
from wavelength import wavelength
wavelength.work(“file_path”)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wave_length-1.3.tar.gz.
File metadata
- Download URL: wave_length-1.3.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31f7d14d8d78a80bff26466799d6cbd66d08ed559667284a19d3ea105ab71f8f
|
|
| MD5 |
1c50201a647fefc2a28be5054d1b571e
|
|
| BLAKE2b-256 |
bfa1d02e6c0cc623f802dd16e369401502b3516c5956ccab8aa09a7504f101ed
|
File details
Details for the file wave_length-1.3-py3-none-any.whl.
File metadata
- Download URL: wave_length-1.3-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63d9f654148aa9d9538ccd8c221d083a3351d3d20195218416ce28e2e702ae16
|
|
| MD5 |
1884b84001a4fca9c578d72814788901
|
|
| BLAKE2b-256 |
275376bb69ac75504c3e3e09e7ff46e13c211b8ca8ff5230287ea88bd92a2288
|