panoptes-data command line¶
The panoptes-data entry point is this module's app.
panoptes.data.utils.cli.main ¶
download ¶
download(
sequence_id: str | None = typer.Argument(
..., help="Sequence ID for the Observation."
),
output_dir: Path = typer.Option(
None,
"--output-dir",
"-o",
help="Output directory for images, defaults to sequence_id.",
),
image_query: str = typer.Option(
'image_status!="ERROR"',
"--image-query",
"-q",
help="Query for images, default 'image_status!=\"ERROR\"'",
),
) -> list[str]
Deprecated: archived frames are not currently available for download.
See ObservationInfo.download_images for why. Exits non-zero.
Source code in src/panoptes/data/utils/cli/main.py
get_metadata ¶
get_metadata(
sequence_id: str | None = typer.Option(
None,
"--sequence-id",
"-i",
help="Sequence ID for the Observation.",
),
unit_id: str | None = typer.Option(
None,
"--unit-id",
"-u",
help="Unit ID for the Observation. Use with a date range to download all metadata for a unit.",
),
start_date: str | None = typer.Option(
None,
"--start-date",
"-s",
help="Start date for downloading metadata in form YYYY-MM-DD",
),
end_date: str | None = typer.Option(
None,
"--end-date",
"-e",
help="End date for downloading metadata, defaults to now.",
),
output_dir: Path = typer.Option(
Path("."),
"--output-dir",
"-o",
help="Output directory for metadata file.",
),
)
Download metadata.
If given a single sequence_id, will download the metadata for that observation. If given a unit_id and date range, will download all metadata for that unit.
Source code in src/panoptes/data/utils/cli/main.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
search ¶
search(
name: str = typer.Option(
None,
"--name",
"-n",
help="Name of object to search for.",
),
unit_id: str = typer.Option(
None,
"--unit-id",
"-u",
help="Unit ID for the Observation.",
),
field_name: str = typer.Option(
None,
"--field",
"-f",
help="Field name to search for.",
),
camera_id: str = typer.Option(
None,
"--camera-id",
"-c",
help="Camera uid to search for.",
),
start_date: str = typer.Option(
None,
"--start-date",
"-s",
help="Start date for the search in form YYYY-MM-DD",
),
end_date: str = typer.Option(
None,
"--end-date",
"-e",
help="End date for the search, defaults to now.",
),
duration: str = typer.Option(
None,
"--duration",
"-D",
help="Window length instead of an end date, e.g. '90 days', '6 months', '10 days before and after'. Not with --end-date.",
),
ra: float = typer.Option(
None, "--ra", help="RA in degrees for search."
),
dec: float = typer.Option(
None,
"--dec",
"-d",
help="Dec in degrees for search.",
),
radius: float = typer.Option(
10,
"--radius",
"-r",
help="Radius in degrees for search.",
),
min_num_frames: int = typer.Option(
1,
"--min-num-frames",
"-m",
help="Minimum number of frames the observation has a document for.",
),
min_num_usable: int = typer.Option(
None,
"--min-num-usable",
"-U",
help="Minimum number of frames the pipeline processed cleanly.",
),
min_duration_minutes: float = typer.Option(
None,
"--min-duration",
"-L",
help="Minimum wall-clock span of the observation, in minutes.",
),
query: str = typer.Option(
None,
"--query",
"-q",
help="A pandas query over the results, e.g. 'iso == 100 and moonfrac < 0.3'.",
),
)
Search for observations.
With no position the search is all-sky, so a unit and a date range, or a frame count and a duration, are each a complete query on their own.
A window can be given as --duration instead of --end-date: "90 days" from the start date, or "10 days before and after" it. With no --start-date a duration runs backward from now.
Source code in src/panoptes/data/utils/cli/main.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
pairs ¶
pairs(
across: str = typer.Option(
"camera_id",
"--across",
"-a",
help="What must differ between the two: 'camera_id' or 'unit_id'.",
),
unit_id: str = typer.Option(
None,
"--unit-id",
"-u",
help="Unit ID to restrict the search to.",
),
start_date: str = typer.Option(
None,
"--start-date",
"-s",
help="Start date for the search in form YYYY-MM-DD",
),
end_date: str = typer.Option(
None,
"--end-date",
"-e",
help="End date for the search, defaults to now.",
),
min_num_frames: int = typer.Option(
1,
"--min-num-frames",
"-m",
help="Minimum number of frames each observation has.",
),
min_overlap_minutes: float = typer.Option(
0.0,
"--min-overlap",
"-o",
help="Discard pairs overlapping by less than this.",
),
any_field: bool = typer.Option(
False,
"--any-field",
help="Do not require the two to have pointed at the same field.",
),
)
Find observations of one field recorded at the same time by different hardware.
A simultaneous pair is the control the photometry rebuild compares against: the sky was the same and the camera was not.