Skip to content

Commit

Permalink
Add stub of PROC extension
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Sep 11, 2023
1 parent 5ca8fcb commit 5e7f3fc
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lvmcam/actor/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
from basecam import ImageNamer
from basecam.actor import BaseCameraActor
from basecam.exposure import Exposure
from basecam.models import Extension, FITSModel, basic_header_model
from basecam.models import Extension, FITSModel, HeaderModel, basic_header_model
from clu import AMQPActor, Command
from clu.client import AMQPReply
from sdsstools import read_yaml_file

from lvmcam import __version__
from lvmcam.models import CameraCards, GenicamCards, ScraperParamCards, WCSCards
from lvmcam.models.proc import ProcCards


conf.auto_download = False
Expand Down Expand Up @@ -62,9 +63,10 @@ def get_camera_class(config: dict):
compressed="RICE_1",
name="RAW",
)
proc = Extension(data="none", header_model=HeaderModel([ProcCards]), name="PROC")

class LVMCamera(BlackflyCamera):
fits_model = FITSModel([raw])
fits_model = FITSModel([raw, proc])
image_namer = ImageNamer(basename=basename, dirname=dirname)

# LCO
Expand Down
78 changes: 78 additions & 0 deletions python/lvmcam/models/proc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: José Sánchez-Gallego ([email protected])
# @Date: 2023-09-11
# @Filename: proc.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)

from __future__ import annotations

from basecam.models import Card, CardGroup


ProcCards = CardGroup(
[
Card(
"TELESCOP",
value="{__exposure__.camera.telescope}",
comment="Telescope that took the image",
),
"CAMNAME",
Card(
"DARKFILE",
value=None,
comment="Associated dark frame",
),
Card(
"DIRNAME",
value=None,
comment="Original file directory",
),
Card(
"GUIDERV",
value="0.0.0",
comment="Version of lvmguider",
),
Card(
"SOURCESF",
value=None,
comment="Sources file",
),
Card(
"PA",
value=None,
comment="[deg] Position angle from WCS",
),
Card(
"ZEROPT",
value=None,
comment="[mag] Zero point of the LVM magnitude",
),
Card(
"ORIGFILE",
value=None,
comment="Original file name",
),
Card(
"REPROC",
value=False,
comment="Has this file been reprocessed?",
),
Card(
"REFFILE",
value=None,
comment="Reference file for astrometric solution",
),
Card(
"SOLVED",
value=False,
comment="Was an astrometric solution found?",
),
Card(
"WCSMODE",
value="none",
comment="Method for fitting the astrometric solution",
),
]
)

0 comments on commit 5e7f3fc

Please sign in to comment.