Class: AstroSubframeOrganizer::PathBuilders::LightPathBuilder

Inherits:
BasePathBuilder
  • Object
show all
Defined in:
lib/astro_subframe_organizer/path_builders/light_path_builder.rb

Overview

rubocop:disable Layout/LineLength Builds folder paths for light (science) frames.

Light frames are organized by the following keywords, which allow WBPP to automatically match lights to calibration frames (darks and flats) during integration:

Pattern:

Light_<target>_PANE_<pane>_FLATSET_<date>_ROTATION_<angle>deg_ISO_<value>_EXP_<value>_Bin_<value>_CCD-TEMP_<value>_TELESCOPE_<name>_FILTER_<name>_CAMERA_<model>

**Keyword meanings:**

  • Target: Object being imaged (e.g., M42, NGC1977)

  • PANE: Mosaic pane identifier (e.g., 1-1, 1-2) - optional

  • FLATSET: Date-based grouping matching the flats/darks captured for this light set

  • ROTATION: Normalized rotation angle (module 180 to ignore meridian flip, only present if rotation is in FITS)

  • ISO/GAIN: Camera ISO or GAIN setting (must match darks and flats)

  • EXP: Exposure time (must match darks and flats)

  • Bin: Binning mode (must match darks and flats)

  • CCD-TEMP: Rounded CCD temperature (used to group frames for calibration consistency)

  • TELESCOPE: Optical equipment used

  • FILTER: Filter used

  • CAMERA: Camera model

The keywords are used by WBPP_Integration to automatically select matching darks, flats, and biases for each light frame during the calibration and integration process.

See README.md for details on WBPP_Integration process icon and keyword matching. rubocop:enable Layout/LineLength

Instance Method Summary collapse

Methods inherited from BasePathBuilder

#initialize

Constructor Details

This class inherits a constructor from AstroSubframeOrganizer::PathBuilders::BasePathBuilder

Instance Method Details

#buildString

Returns The folder path for this light frame.

Returns:

  • (String)

    The folder path for this light frame



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/astro_subframe_organizer/path_builders/light_path_builder.rb', line 34

def build
  pane_segment = @metadata.mosaic_pane ? "_PANE_#{@metadata.mosaic_pane}" : ''
  prefix = "Light_#{@metadata.target}#{pane_segment}"

  [
    prefix,
    "FLATSET_#{@metadata.flatset_id}",
    @metadata.normalized_rotation&.then { |r| "ROTATION_#{r}deg" },
    iso_or_gain,
    "EXP_#{@metadata.exposure}",
    "Bin_#{@metadata.bin}",
    "CCD-TEMP_#{@metadata.rounded_ccd_temp}",
    "TELESCOPE_#{@metadata.telescope || '????'}",
    "FILTER_#{@metadata.filter || '????'}",
    "CAMERA_#{@metadata.camera || '????'}",
  ].compact.join('_')
end