text stringlengths 0 251 |
|---|
"pixel_bounds_top_left_origin", |
panel.get("pixel_bounds"), |
), |
) |
if isinstance(bounds, dict): |
left = bounds.get("left") |
top = bounds.get("top") |
right = bounds.get("right") |
bottom = bounds.get("bottom") |
if right is None and left is not None: |
right = float(left) + float(bounds.get("width")) |
if bottom is None and top is not None: |
bottom = float(top) + float(bounds.get("height")) |
bounds = [left, top, right, bottom] |
normalized["pixel_bounds_top_left"] = bounds |
submitted_series = panel.get("series") |
if submitted_series is None: |
event_id = panel.get("event_id") |
if { |
"precursor", |
"primary", |
"quiet", |
"bow_shock", |
} <= set(effective_palette): |
submitted_series = { |
"precursor": { |
"event_id": "precursor", |
"x_field": "energy_kev", |
"y_field": "transient_mean", |
}, |
"primary": { |
"event_id": "primary", |
"x_field": "energy_kev", |
"y_field": "transient_mean", |
}, |
"quiet": { |
"x_field": "energy_kev", |
"y_field": "quiet_mean", |
}, |
"bow_shock": { |
"x_field": "energy_kev", |
"y_field": "bow_shock_mean", |
}, |
} |
elif ( |
event_id in EVENT_IDS |
and {"low_energy", "high_energy"} |
<= set(effective_palette) |
): |
submitted_series = { |
"low_energy": { |
"x_field": "energy_kev", |
"y_field": "transient_excess", |
"selection": "used_in_fit", |
}, |
"high_energy": { |
"x_field": "energy_kev", |
"y_field": "transient_excess", |
"selection": "used_in_fit", |
}, |
} |
series: dict[str, dict[str, object]] = {} |
if isinstance(submitted_series, dict): |
items = submitted_series.items() |
elif isinstance(submitted_series, list): |
items = [] |
for declaration in submitted_series: |
assert isinstance(declaration, dict), ( |
"figure manifest series entries must be objects") |
submitted_name = declaration.get( |
"name", |
declaration.get("series_id"), |
) |
assert isinstance(submitted_name, str), ( |
"figure manifest series entries need a name") |
items.append((submitted_name, declaration)) |
else: |
> raise AssertionError( |
"figure manifest panel series must be an object or list") |
E AssertionError: figure manifest panel series must be an object or list |
test_outputs.py:1102: AssertionError |
________________ test_adversarial_figure_shortcuts_are_rejected ________________ |
def test_adversarial_figure_shortcuts_are_rejected() -> None: |
reference = independent_reference() |
> image, manifest = load_figure() |
^^^^^^^^^^^^^ |
test_outputs.py:2154: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
test_outputs.py:1257: in load_figure |
manifest = normalize_figure_manifest(raw_manifest) |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
test_outputs.py:1237: in normalize_figure_manifest |
normalize_panel(panel, palette) |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
panel = {'axis_labels': {'x': 'Electron Energy (keV)', 'y': 'Differential Number Intensity (cm^-2 s^-1 sr^-1 keV^-1)'}, 'axis_...ock': '#277da1', 'precursor_transient': '#2a9d8f', 'primary_transient': '#7b2cbf', 'quiet_background': '#d1495b'}, ...} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.