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: ...

Interactive Pixel Stack Builder

Adjust the thickness of each layer in a BSI pixel cross-section. The visualization shows the vertical stack with refractive indices and a scale bar.

Total stack height:4.58 um
0.01.02.03.04.0Microlens0.60 umn=1.56Planarization0.30 umn=1.46Color Filter0.60 umn=1.55n=1.8Silicon3.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.6CFA 두께 (um)
patternstr"bayer_rggb"필터 패턴
materialsdict{"R":"cf_red","G":"cf_green","B":"cf_blue"}색상-재료 매핑
grid.enabledbooltrue금속 그리드 활성화
grid.widthfloat0.05그리드 선 폭 (um)
grid.heightfloat0.6그리드 높이 (um)
grid.materialstr"tungsten"그리드 재료

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.widthfloat0.1트렌치 폭 (um)
dti.depthfloat3.0트렌치 깊이 (um)
dti.materialstr"sio2"충전 재료

solver: SolverConfig

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

solver.convergence: ConvergenceConfig

필드타입기본값설명
auto_convergeboolfalse자동 푸리에 차수 스윕
order_range[int, int][5, 25]최소/최대 푸리에 차수
qe_tolerancefloat0.01수렴 임계값
spacing_range[float, float] or nullnullFDTD용 그리드 간격 범위

solver.stability: StabilityConfig

필드타입기본값설명
precision_strategystr"mixed""float32", "float64", "mixed", "adaptive"
allow_tf32boolfalseAmpere+ GPU에서 TF32 허용
eigendecomp_devicestr"cpu""cpu" 또는 "gpu"
fourier_factorizationstr"li_inverse""naive", "li_inverse", "normal_vector"
energy_check.enabledbooltrue에너지 밸런스 검사 활성화
energy_check.tolerancefloat0.02최대 허용
energy_check.auto_retry_float64booltrue실패 시 float64로 자동 재시도
eigenvalue_broadeningfloat1e-10축퇴 감지 임계값
condition_number_warningfloat1e12병조건 행렬 경고 기준

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
    meent.yaml
    fdtd_flaport.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

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

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