PI 1.9 版本更新带来了强大的背景光校正工具 MGC,而使用 MGC 之前必须先对目标图像做一次 SPFC(光谱光度通量校准),而 SPFC 又是要对应拍摄时使用的滤镜来做校准的。
然而 PI 自带的滤镜库并没有完全覆盖市面所有天文滤镜,例如缺失了 Chroma 的 Luminance。这里便以 Chroma L 滤镜为例,介绍如何将自定义滤镜资料添加到 PI 的滤镜库。
找到对应数据
首先要找到该滤镜对应的波段与透过率的参数。Chroma 在官网有对应滤镜的参数文件下载。
下载后打开这个 txt 文件,是一堆波段与对应的透过率数值。
其他品牌的滤镜资料应该可以向对应的厂家索取。
生成滤镜资料文件
接下来我们要处理这些数值。用 Python 或者其他任意工具,将波段保留 300 - 800,透过率保留小数点后三位,并且对应以下格式,编辑到一个新的文本文件中:
<Filter name="Chroma L" channel="L" data="302,0.000,304,0.000,306,0.000,308,0.000,310,0.000,312,0.000,314,0.000,316,0.000,318,0.000,320,0.000,322,0.000,324,0.000,326,0.000,328,0.000,330,0.000,332,0.000,334,0.000,336,0.000,338,0.000,340,0.000,342,0.000,344,0.000,346,0.000,348,0.000,350,0.000,352,0.000,354,0.000,356,0.000,358,0.000,360,0.000,362,0.000,364,0.000,366,0.000,368,0.000,370,0.000,372,0.000,374,0.000,376,0.000,378,0.000,380,0.000,382,0.000,384,0.000,386,0.000,388,0.000,390,0.000,392,0.000,394,0.000,396,0.000,398,0.000,400,0.000,402,0.000,404,0.000,406,0.000,408,0.000,410,0.000,412,0.000,414,0.000,416,0.002,418,0.317,420,0.974,422,0.977,424,0.979,426,0.979,428,0.980,430,0.978,432,0.978,434,0.980,436,0.978,438,0.977,440,0.972,442,0.969,444,0.965,446,0.967,448,0.979,450,0.981,452,0.982,454,0.981,456,0.983,458,0.983,460,0.984,462,0.985,464,0.985,466,0.985,468,0.985,470,0.985,472,0.983,474,0.985,476,0.984,478,0.982,480,0.985,482,0.986,484,0.985,486,0.982,488,0.983,490,0.985,492,0.983,494,0.984,496,0.984,498,0.981,500,0.982,502,0.985,504,0.985,506,0.982,508,0.975,510,0.974,512,0.972,514,0.966,516,0.966,518,0.977,520,0.984,522,0.984,524,0.984,526,0.984,528,0.983,530,0.984,532,0.982,534,0.978,536,0.979,538,0.983,540,0.984,542,0.984,544,0.985,546,0.985,548,0.985,550,0.985,552,0.986,554,0.986,556,0.986,558,0.986,560,0.985,562,0.985,564,0.985,566,0.983,568,0.983,570,0.984,572,0.984,574,0.982,576,0.981,578,0.984,580,0.986,582,0.985,584,0.986,586,0.988,588,0.986,590,0.981,592,0.978,594,0.982,596,0.986,598,0.987,600,0.987,602,0.988,604,0.987,606,0.984,608,0.983,610,0.986,612,0.988,614,0.987,616,0.983,618,0.982,620,0.986,622,0.988,624,0.986,626,0.985,628,0.986,630,0.988,632,0.988,634,0.987,636,0.987,638,0.986,640,0.982,642,0.980,644,0.982,646,0.986,648,0.986,650,0.984,652,0.983,654,0.985,656,0.986,658,0.982,660,0.978,662,0.979,664,0.984,666,0.985,668,0.982,670,0.981,672,0.983,674,0.983,676,0.980,678,0.979,680,0.981,682,0.984,684,0.983,686,0.982,688,0.978,690,0.973,692,0.977,694,0.976,696,0.804,698,0.186,700,0.020,702,0.003,704,0.001,706,0.000,708,0.000,710,0.000,712,0.000,714,0.000,716,0.000,718,0.000,720,0.000,722,0.000,724,0.000,726,0.000,728,0.000,730,0.000,732,0.000,734,0.000,736,0.000,738,0.000,740,0.000,742,0.000,744,0.000,746,0.000,748,0.000,750,0.000,752,0.000,754,0.000,756,0.000,758,0.000,760,0.000,762,0.000,764,0.000,766,0.000,768,0.000,770,0.000,772,0.000,774,0.000,776,0.000,778,0.000,780,0.000,782,0.000,784,0.000,786,0.000,788,0.000,790,0.000,792,0.000,794,0.000,796,0.000,798,0.000,800,0.000"/>
Filter name 输入要显示的滤镜名字, channel 后输入对应的滤镜类别(L、R、G、B...),data 后是对应的波段和透过率。
导入滤镜资料文件
打开 PI 滤镜库文件:
C:\Program Files\PixInsight\library\filters.xspd
将上一步的代码填入文件中,如下图:
由于安全权限关系,保存此 filter.xspd 文件到其他地方,然后再复制回原本的目录中,覆盖原有文件。
在 PI 中打开 FilterManager 进程,Task 下拉选单选择 Import XML filter database, input file 选择上述 xspd 文件。
点一下 Filter Manager 左下角的实心圆,就能在 SPFC 中找到刚导入的 Chroma L 滤镜了。
额外小技巧:修改默认滤镜
打开 SPCC 或者 SPFC,默认滤镜都是什么 Sony Color Sensor 系列,对于正经拍深空的用户来说完全按用不上,每次都要修改会很烦,其实我们可以修改这个默认的设置。
打开 PI 滤镜库文件:
C:\Program Files\PixInsight\library\filters.xspd
找到 default 字符:
把 default 字段剪切到对应的滤镜数值后,例如:
保存文件,再重复上一步导入资料文件,以后打开 SPFC 或者 SPCC 的时候就会默认使用你设置的滤镜了。
你甚至能通过此方法设置默认的 QE Curve 和 White Balance。
星友评论