Skip to content
Merged
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
18 changes: 11 additions & 7 deletions hipercam/scripts/hplot.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import sys
import os
import sys
from functools import partial

import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt

from trm.pgplot import *
import numpy as np
from trm import cline
from trm.cline import Cline
from trm.pgplot import *

import hipercam as hcam
from hipercam import utils
Expand Down Expand Up @@ -340,18 +339,18 @@ def hplot(args=None):
)
shbox = cl.get_value(
"shbox",
"half width of box for initial location" " of target [unbinned pixels]",
"half width of box for initial location of target [unbinned pixels]",
11.0,
2.0,
)
smooth = cl.get_value(
"smooth",
"FWHM for smoothing for initial object" " detection [binned pixels]",
"FWHM for smoothing for initial object detection [binned pixels]",
6.0,
)
fhbox = cl.get_value(
"fhbox",
"half width of box for profile fit" " [unbinned pixels]",
"half width of box for profile fit [unbinned pixels]",
21.0,
3.0,
)
Expand Down Expand Up @@ -514,6 +513,11 @@ def __init__(
self.thresh = thresh

def _keyPressEvent(self, event):
# matplotlib 3.11 changes callback order so for "q" there is no
# canvas manager any more
if event.key == "q":
return

pzoom = self.fig.canvas.manager.toolbar.mode == "pan/zoom"
# only when not in pan/zoom mode
if not pzoom and event.key in [" ", "r"] and event.inaxes is not None:
Expand Down
Loading