Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development progress on schedtel #92

Merged
merged 11 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

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 @@
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 @@
if custom_header is not None:
hdr.update(custom_header)

if history is not None:
if type(history) is str:
history = [history]

Check warning on line 1223 in pyscope/observatory/observatory.py

View check run for this annotation

Codecov / codecov/patch

pyscope/observatory/observatory.py#L1223

Added line #L1223 was not covered by tests
for hist in history:
hdr["HISTORY"] = hist

Check warning on line 1225 in pyscope/observatory/observatory.py

View check run for this annotation

Codecov / codecov/patch

pyscope/observatory/observatory.py#L1225

Added line #L1225 was not covered by tests

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