用于调整光参量放大器和多维光谱仪的工具。
项目描述
attune
用于调整光参量放大器和多维光谱仪的工具。
文档可在https://attune.wright.tools/en/latest/找到。
概述
attune
有三个主要任务
-
attune解析校准数据以找到最佳电机位置
# data has scans of a motor position ("OPA1_SHS_crystal") against a signal # ("signal") for a set of second harmonic signal color setpoints # ("opa_color") calibration_data = wt.open(path_to_data.wt5) calibration_data.transform("opa_color", "motor") args = { "data": calibration_data, "channel": "signal", "arrangement": "SHS", "tune": "SHS_crystal", "instrument": "OPA1", } tuned_opa1 = attune.intensity(**args)
-
attune
组织最佳电机位置。这些位置存储在映射的层次结构中。从最低级别开始-
调谐:将OPA颜色(“独立”)映射到单个电机的位置(“依赖”)的映射。
my_tune = attune.Tune( independent=[450, 600, 700], dependent=[3.225, 2.332, 1.987] ) # relate color to bbo angle
-
排列:定义协调过程的调谐集合(例如,要产生游散光子,可能需要移动几个电机(
bbo
、g1
等))idler = attune.Arrangement("idler", dict(bbo=my_tune, g1=my_other_tune))
-
仪器:排列的集合(例如,OPA可能具有信号和游散)
my_opa = attune.Instrument({"idler": idler, "signal": signal}, name="opa1")
注意:如果排列存在于同一仪器中,则可以将其称为可调谐的。这可以允许嵌套命名
shi = attune.Arrangement(Dict( idler = Tune(shi_colors, idler_colors), sh_crystal = Tune(shi_colors, angles) ))
-
-
attune
存储电机映射并通过版本跟踪记住它们。-
保存新仪器(或更新现有仪器)
attune.store(my_opa)
-
通过名称查找已保存的仪器
attune.catalog() # lists all saved instruments my_opa = attune.load("opa1") # fetches the most recent version of the instrument my_previous_opa = attune.undo(my_opa) # fetches the previous version of the instrument my_old_opa = attune.load("opa1", time="yesterday") # optional kwarg specifies the version by time of usage
-
注意
attune
使用纳米("nm")作为其独立变量的默认单位。 目前,无法更改单位,因此必须在外部处理替代单位(欢迎提交PR!)。WrightTools校准数据将自动转换为"nm"单位进行解析。
项目详情
下载文件
下载您平台上的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
attune-0.5.0.tar.gz (25.5 KB 查看哈希)
构建分布
attune-0.5.0-py2.py3-none-any.whl (31.3 KB 查看哈希)