1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CodeV レンズファイルフォーマットのメモ

Last updated at Posted at 2021-08-15

背景

CodeV は持っていないが, Edmund optics のサイトなどにある CodeV のレンズデータを自作レンズシミュレータや他の光学ソフトなどで読み込みたい.

参考情報

OpTaliX マニュアル
http://optenso.com/download/download.html

用語やコマンド名などは CodeV(+ Zemax とも?)と似ているのが多いので役に立つ.

python ray-optics
https://ray-optics.readthedocs.io/en/latest/
(いくらか .seq のパーサーがある)

コマンド

基本行単位. 上から読んでいく.
最後に & がついているのは bash でいう \ みたいなもの(つまり次の行を連結する)

主要なもの

  • DIM : 単位. M = [mm], C = [cm], I = インチ
  • WL : 波長リスト
  • REF : reference wavelength
  • WTW : 各波長への重み
  • XAN : paraxial? での角度での field X リスト
  • YAN : paraxial? での角度での field Y リスト(=> image height(像高)のリスト)
  • YIM : real(?) image height
  • WTF : 各 field の重み
  • SO : Object 面
    • SO curvature thickness : 通常 curvature 0.0, thickness は大きめ(遠方)の値
  • S : サーフェスの定義
    • S curvature thickness [glass]. glass が抜けている場合は air とみなす.
    • CIR : aperture radius
    • CCY : ?
    • THC : Thickness?
    • EDG : Edge aperture
    • STO : stop surface(aperture)である
  • SI : Image 面
    • SI curvature thickness. PIM が有効な場合は thickness がマイナス(=Defocus)となることもある. 最後の SSI の thickness を足したものが最終的な image 面への距離となる.
    • その他: OpTaliX マニュアル 8.3 Surface Parameters を参照.
  • PIM [YES|NO] paraxial image solve
  • GO : レンズ定義の終了

非球面レンズ

ASP で定義

  • K : conic
  • A ~ J : 4, 6, 8, ... 20 次までの非球面係数(EVEN18). 通常は H(18 次まで)

注意点

S でも thickness がマイナスになるときがある.
たとえば最初に stop surface が定義されているが, その次のレンズ面が stop 面より前(object 側)にあるときなど.

ガラスの定義

F5_SCHOTT など

Schott(ショット光学)の F5.

やガラスメーカーのサイトなど探せば, メジャーなガラスの屈折率などの情報を得られる.

Private glass

カスタムの IOR を持つガラス.

seq では波長 + IOR 値のペアで定義する.

rayoptics のサンプルデータから.

PRV
  PWL 1600.0 1500.0 1400.0 1300.0 1200.0 1100.0 1000.0 900.0 800.0 700.0 650.0&
   600.0 587.6 546.1 486.1 480.0 460.0 440.0 404.7 400.0
  'E48' 1.5184 1.5188 1.5192 1.5197 1.5201 1.5219 1.5231 1.5247 1.5257 1.527&
   1.5286 1.5306 1.53116 1.5334 1.5378 1.5384 1.5404 1.5427 1.5476 1.5484
END

'E48' がガラス名となる.

これを利用するときは, データを Sellmeier 式でフィッティングとかではなくて, 各点を通る曲線として扱うっぽい.
rayoptics では scipy.interpolate.interp1d で cubic 補間をしている.

fields, object points

OpTaliX マニュアル 7.3.1 参照.

field : イメージ(センサー)面での位置(高さ). CG とかで使われるフィールドとは意味が異るので注意.
object points : シーン側での物体位置

  • XAN, YAN : 角度
  • XIM, YIM : paraxial image height. height = EFL * tan(theta) 式で求まるもの. EFL = effective focal length.
  • XRI, YRI : real image height. 実像高?. これに対応する入射角は, aperture の中心を通り, 指定した像高位置へ入射する chief ray を求める(ニュートン法あたりで収束計算)必要がある
  • XOB, YOB : 物体側の高さ.
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?