Skip to content

설정 레퍼런스(Config Reference)

COMPASS 설정 스키마(configuration schema)의 전체 레퍼런스입니다. 모든 설정은 compass.core.config_schema에 정의된 Pydantic 모델로 검증됩니다.

최상위: CompassConfig

yaml
pixel: ...          # PixelConfig
solver: ...         # SolverConfig
source: ...         # SourceConfig
compute: ...        # ComputeConfig
experiment_name: "default"
output_dir: "./outputs"
seed: 42
필드타입기본값설명
experiment_namestr"default"출력 디렉터리용 실험 식별자
output_dirstr"./outputs"기본 출력 디렉터리
seedint42재현성을 위한 랜덤 시드

pixel: PixelConfig

yaml
pixel:
  pitch: 1.0
  unit_cell: [2, 2]
  bayer_map: [["R", "G"], ["G", "B"]]
  layers: ...       # LayersConfig
필드타입기본값설명
pitchfloat1.0픽셀 피치 (um)
unit_cell[int, int][2, 2]유닛 셀 크기 [행, 열]
bayer_maplist[list[str]][["R","G"],["G","B"]]색상 채널 맵

pixel.layers: LayersConfig

yaml
layers:
  air: {thickness: 1.0, material: "air"}
  microlens: ...
  planarization: {thickness: 0.3, material: "sio2"}
  color_filter: ...
  barl: ...
  silicon: ...

인터랙티브 픽셀 스택 빌더

BSI 픽셀 단면의 각 층 두께를 조정하세요. 패턴 레이어는 z envelope와 실제 마이크로렌즈, 컬러 필터, grid, DTI 재료 영역을 분리해서 표시합니다.

전체 스택 높이:4.58 um
0.01.02.03.04.0마이크로렌즈0.60 umn=1.00 / 1.56평탄화층0.30 umn=1.46컬러 필터0.60 umn=1.46 / 1.55n=1.8실리콘3.00 umn=3.5DTI

pixel.layers.microlens: MicrolensConfig

필드타입기본값설명
enabledbooltrue마이크로렌즈 활성화
heightfloat0.6렌즈 새그 높이(sag height) (um)
radius_xfloat0.48x 방향 반축 (um)
radius_yfloat0.48y 방향 반축 (um)
materialstr"polymer_n1p56"렌즈 재료
profile.typestr"superellipse"프로파일 모델
profile.nfloat2.5사각도 매개변수
profile.alphafloat1.0곡률 매개변수
shift.modestr"auto_cra"시프트 모드: "none", "manual", "auto_cra"
shift.cra_degfloat0.0자동 시프트용 CRA (도)
shift.shift_xfloat0.0수동 x 시프트 (um)
shift.shift_yfloat0.0수동 y 시프트 (um)
gapfloat0.0렌즈 간 간격 (um)

pixel.layers.color_filter: ColorFilterConfig

필드타입기본값설명
thicknessfloat0.6legacy flat CFA 두께(um), 색별 두께가 없을 때 사용
patternstr"bayer_rggb"필터 패턴
materialsdict{"R":"cf_red","G":"cf_green","B":"cf_blue"}legacy 색상-재료 매핑
red.material, green.material, blue.materialstrcf_*색별 재료명
red.thickness, green.thickness, blue.thicknessfloatthickness색별 CFA 높이(um)
red.contact_angle, green.contact_angle, blue.contact_anglefloat90.0grid 위 사다리꼴 돌출부 sidewall 각도(deg)
grid.enabledbooltrue금속 그리드 활성화
grid.widthfloat0.05그리드 선 폭 (um)
grid.thicknessfloatthickness금속 grid 높이(um)
grid.heightfloat0.6grid.thickness의 legacy alias
grid.materialstr"tungsten"그리드 재료
grid.corner_radiusfloat0.0각 CF 셀의 rounded rectangle 모서리 반경 r(um). 네 모서리 모두 동일. 0 = 직각, > 0이면 CF를 rounded rectangle로 모델링하고 격자는 그 보집합. (pitch - grid.width) / 2로 클램프.
n_slicesinttaper 시 8taper된 컬러 필터 relief를 계단 근사할 z-slice 수

pixel.layers.barl: BarlConfig

yaml
barl:
  layers:
    - {thickness: 0.010, material: "sio2"}
    - {thickness: 0.025, material: "hfo2"}

{thickness, material} 쌍의 목록이며, 상단에서 하단 순으로 정렬됩니다.

pixel.layers.silicon: SiliconConfig

필드타입기본값설명
thicknessfloat3.0실리콘 두께 (um)
materialstr"silicon"기판 재료
photodiode.position[float, float, float][0, 0, 0.5]PD 오프셋 (x, y, z) um
photodiode.size[float, float, float][0.7, 0.7, 2.0]PD 크기 (dx, dy, dz) um
dti.enabledbooltrueDTI 활성화
dti.modestr"fdti""fdti"(전체) 또는 "bdti"(후면 부분)
dti.widthfloat0.1트렌치 개구부 폭 (um)
dti.depthfloat3.0트렌치 깊이 (um)
dti.materialstr"sio2"코어 충전 재료
dti.liner.enabledboolfalse트렌치 측벽 컨포멀 high-k 라이너
dti.liner.materialstr"al2o3"라이너 재료
dti.liner.thicknessfloat0.0라이너 두께 (um)
dti.taper_anglefloat90.0기판면 기준 측벽 각도 (90 = 수직)
dti.n_slicesint6테이퍼 트렌치의 계단형 z-슬라이스 수
surface_texture.enabledboolfalseNIR 광포획용 후면 역피라미드 어레이
surface_texture.heightfloat0.3피라미드 높이 (um)
surface_texture.periodfloat or nullnull피라미드 주기 (um); 기본은 픽셀 피치
surface_texture.fill_materialstr"sio2"피트 충전 재료
surface_texture.n_slicesint8피라미드 계단형 z-슬라이스 수

solver: SolverConfig

yaml
solver:
  name: torcwa
  type: rcwa
  params:
    fourier_order: [9, 9]
    dtype: "complex64"
  stability: ...
필드타입기본값설명
namestr"torcwa"솔버 백엔드 이름
typestr"rcwa""rcwa", "fdtd", 또는 "tmm"
paramsdict{"fourier_order": [9,9]}솔버 고유 매개변수 (아래 참조)

solver.params 의미

params는 솔버 어댑터에 그대로 전달되므로 각 키의 의미는 솔버마다 다릅니다. 가장 중요한 차이:

  • torcwa / meent / fmmax: 축별 푸리에 차수 fourier_order: [m, m] → 총 평면파 수 (2m+1)².
  • grcwa: 총 평면파 수로 절단합니다. nG를 직접 지정하세요(예: nG: 49). 레거시 폴백으로 fourier_order[0]도 경고와 함께 허용되지만, 다른 RCWA 솔버의 같은 숫자와 동등하지 않습니다.
  • FDTD 솔버: grid_spacing(um) 또는 resolution(pixels/um, meep) 사용.

모든 결과에는 metadata["qe_method"](field_integration, eps_imag_weight, tmm_1d_analytic)가 기록되므로, 솔버 간 QE 차이가 솔버 정확도 차이인지 후처리 방법 차이인지 구분할 수 있습니다.

solver.stability: StabilityConfig

필드타입기본값설명
precision_strategystr"mixed""float32", "float64", "mixed", "adaptive" — 진단(pre-simulation check)에서 사용
allow_tf32boolfalseAmpere+ GPU에서 TF32 허용 (RCWA에서는 false 유지)
fourier_factorizationstr"li_inverse""naive", "li_inverse", "normal_vector"
energy_check.enabledbooltrue실행 후 R+T+A ≈ 1 검증
energy_check.tolerancefloat0.02최대 허용 |R+T+A-1|
energy_check.auto_retry_float64booltrue위반 시 dtype을 승격해 1회 재실행 (complex64→complex128, float32→float64); 재시도는 metadata["energy_retry_dtype"]로 표시

source: SourceConfig

yaml
source:
  type: planewave
  wavelength:
    mode: single
    value: 0.55
  angle:
    theta_deg: 0.0
    phi_deg: 0.0
  polarization: unpolarized
필드타입기본값설명
typestr"planewave""planewave" 또는 "cone_illumination"
wavelength.modestr"single""single", "sweep", 또는 "list"
wavelength.valuefloat0.55단일 파장 (um)
wavelength.sweep.startfloat0.38스윕 시작 (um)
wavelength.sweep.stopfloat0.78스윕 종료 (um)
wavelength.sweep.stepfloat0.01스윕 간격 (um)
wavelength.valueslist[float]null명시적 파장 목록
angle.theta_degfloat0.0극각 (도)
angle.phi_degfloat0.0방위각 (도)
polarizationstr"unpolarized""TE", "TM", 또는 "unpolarized"

compute: ComputeConfig

yaml
compute:
  backend: auto
  gpu_id: 0
  num_workers: 4
필드타입기본값설명
backendstr"auto""auto", "cuda", "cpu", "mps"
gpu_idint0GPU 장치 인덱스
num_workersint4병렬 작업용 워커 스레드 수

Hydra 설정 구조

COMPASS는 모듈식 설정을 위해 Hydra를 사용합니다:

configs/
  config.yaml           # 기본값이 포함된 메인 설정
  pixel/
    default_bsi_1um.yaml
    default_bsi_0p8um.yaml
  solver/
    torcwa.yaml
    grcwa.yaml            # + grcwa_fast.yaml, grcwa_converged.yaml 프리셋
    meent.yaml
    fmmax.yaml
    fdtd_flaport.yaml
    fdtdz.yaml
    fdtdx.yaml
    meep.yaml
    tmm.yaml
  source/
    planewave.yaml
    wavelength_sweep.yaml
    cone_illumination.yaml
  compute/
    cuda.yaml
    cpu.yaml
    mps.yaml
  experiment/
    solver_comparison.yaml
    qe_benchmark.yaml
    roi_sweep.yaml
    optimize_microlens.yaml

명령줄에서 모든 매개변수를 오버라이드할 수 있습니다:

bash
python scripts/run_simulation.py \
    pixel.pitch=0.8 \
    solver.params.fourier_order=[11,11] \
    source.wavelength.mode=sweep