Skip to content

Commit

Permalink
Merge pull request #92 from WWGolay/schedtel-dev
Browse files Browse the repository at this point in the history
Development progress on schedtel
  • Loading branch information
WWGolay authored Dec 19, 2023
2 parents f0a2f4c + 8a08345 commit 3bfb7d2
Show file tree
Hide file tree
Showing 30 changed files with 6,199 additions and 3,461 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
}
}

},
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ pyscope

|License| |Zenodo| |PyPI Version| |PyPI Python Versions| |PyPI Downloads| |Astropy| |GitHub CI| |Code Coverage| |Documentation Status| |Codespaces Status| |pre-commit| |Black| |isort| |Donate|

.. image:: https://github.com/WWGolay/pyscope/blob/main/docs/source/images/pyscope_logo_white.png
:alt: pyscope logo

This is the repository for `pyscope <https://pyscope.readthedocs.io/en/latest/>`_,
a pure-Python package for robotic scheduling, operation, and control of small
optical telescopes.
Expand Down
6,039 changes: 3,389 additions & 2,650 deletions coverage.xml

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed docs/source/images/pyscope_logo_small.png
Binary file not shown.
Binary file removed docs/source/images/pyscope_logo_small_gray.png
Binary file not shown.
2 changes: 1 addition & 1 deletion pyscope/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

import logging

__version__ = "0.1.5"
__version__ = "0.1.6"

from . import utils
from . import observatory
Expand Down
9 changes: 8 additions & 1 deletion pyscope/observatory/observatory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,12 +1156,13 @@ def save_last_image(
do_fwhm=False,
overwrite=False,
custom_header=None,
history=None,
**kwargs,
):
"""Saves the current image"""

logger.debug(
f"Observatory.save_last_image({filename}, {frametyp}, {do_wcs}, {do_fwhm}, {overwrite}, {custom_header}, {kwargs}) called"
f"Observatory.save_last_image({filename}, {frametyp}, {do_wcs}, {do_fwhm}, {overwrite}, {custom_header}, {history}, {kwargs}) called"
)

if not self.camera.ImageReady:
Expand Down Expand Up @@ -1217,6 +1218,12 @@ def save_last_image(
if custom_header is not None:
hdr.update(custom_header)

if history is not None:
if type(history) is str:
history = [history]
for hist in history:
hdr["HISTORY"] = hist

hdu = fits.PrimaryHDU(self.camera.ImageArray, header=hdr)
hdu.writeto(filename, overwrite=overwrite)

Expand Down
1 change: 0 additions & 1 deletion pyscope/reduction/calib_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from ..observatory import AstrometryNetWCS
from .ccd_calib import ccd_calib


logger = logging.getLogger(__name__)


Expand Down
13 changes: 9 additions & 4 deletions pyscope/telrun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
from .init_dirs import init_telrun_dir, init_remote_dir
from .mk_mosaic_schedule import mk_mosaic_schedule
from .rst import rst
from .schedtel import schedtel, plot_schedule_gantt, parse_sch_file
from . import sch
from . import schedtab
from .schedtel import schedtel, plot_schedule_gantt, plot_schedule_sky
from .startup import start_telrun, start_syncfiles
from .summary_report import summary_report
from . import reports
from .syncfiles import syncfiles
from .telrun_block import TelrunBlock
from .telrun_operator import TelrunOperator

__all__ = [
Expand All @@ -25,13 +28,15 @@
"init_remote_dir",
"mk_mosaic_schedule",
"rst",
"sch",
"schedtab",
"schedtel",
"plot_schedule_gantt",
"parse_sch_file",
"start_telrun",
"start_syncfiles",
"summary_report",
"reports",
"syncfiles",
"TelrunBlock",
"TelrunOperator",
"TelrunException",
]
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,10 @@ def summary_report_cli(
)


@click.command()
def schedule_report_cli():
pass


summary_report = summary_report_cli.callback
schedule_report = schedule_report_cli.callback
Loading

0 comments on commit 3bfb7d2

Please sign in to comment.