GEMMA DEVELOPER AGENTSAVED EVIDENCE
← Dataset Exploration
ARCHIVED TRAINING / gammapy/gammapy

gammapy__gammapy-5674

This is a preserved training example. Membership in the current training wave has not been verified.
gammapy/gammapy · Task 70 of 169

Problem statement

FluxPoints.resample_axis fails in 1.3
**Gammapy version**
1.3, dev



**Bug description**
FluxPoints.resample_axis raises an error




**To Reproduce**
In the `analysis_2.py` tutorial, add at the end
```
from gammapy.estimators.utils import get_rebinned_axis
ax_new = get_rebinned_axis(fluxpoint=flux_points, method="min-ts", ts_threshold=10)
flux_points.resample_axis(ax_new)
```

This fails with an error:

```
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[40], line 1
----> 1 flux_points.resample_axis(ax_new)

File ~/Gammapy-dev/gammapy/gammapy/estimators/points/core.py:869, in FluxPoints.resample_axis(self, axis_new)
    867         edge_max = edge_max + axis_new.reference_time
    868     fp = self.slice_by_coord({axis_new.name: slice(edge_min, edge_max)})
--> 869     fp_new = squash_fluxpoints(fp, axis_new)
    870     fluxpoints.append(fp_new)
    872 return self.__class__.from_stack(fluxpoints, axis=axis_new)

File ~/Gammapy-dev/gammapy/gammapy/estimators/points/core.py:55, in squash_fluxpoints(flux_point, axis)
     52 if axis.name != "energy":
     53     geom = geom.to_cube([flux_point.geom.axes["energy"]])
---> 55 maps["norm"] = Map.from_geom(geom, data=minimizer.x)
     56 maps["norm_err"] = Map.from_geom(
     57     geom, data=np.sqrt(minimizer.hess_inv.todense()).reshape(geom.data_shape)
     58 )
     59 maps["n_dof"] = Map.from_geom(geom, data=flux_point.geom.axes[axis.name].nbin)

File ~/Gammapy-dev/gammapy/gammapy/maps/core.py:304, in Map.from_geom(geom, meta, data, unit, dtype)
    301     raise ValueError("Unrecognized geom type.")
    303 cls_out = Map._get_map_cls(map_type)
--> 304 return cls_out(geom, data=data, meta=meta, unit=unit, dtype=dtype)

File ~/Gammapy-dev/gammapy/gammapy/maps/region/ndmap.py:56, in RegionNDMap.__init__(self, geom, data, dtype, meta, unit)
     53     meta = {}
     55 self._geom = geom
---> 56 self.data = data
     57 self.meta = meta
     58 self._unit = u.Unit(unit)

File ~/Gammapy-dev/gammapy/gammapy/maps/region/ndmap.py:84, in RegionNDMap.data(self, value)
     81         value = np.expand_dims(value, (-2, -1))
     83 if self.geom.data_shape != value.shape:
---> 84     raise ValueError(
     85         f"Input shape {input_shape} is not compatible with shape from geometry {self.geom.data_shape}"
     86     )
     88 self._data = value

ValueError: Input shape (1,) is not compatible with shape from geometry (1, 1)
```

Training membership

opd_e4b_cispo_v5 opd_e4b_pure_v6a opd_e4b_pure_v6b opd_e4b_pure_v7 opd_e4b_pure_v7b opd_e4b_self_audit_v4

Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.

Task and snapshot provenance

Snapshot captured 2026-11-12T17:06:59.476467+00:00 · Autoresearch-Arena/gemma-4-developer-agent

{
  "datasets": [
    "opd_e4b_cispo_v5",
    "opd_e4b_pure_v6a",
    "opd_e4b_pure_v6b",
    "opd_e4b_pure_v7",
    "opd_e4b_pure_v7b",
    "opd_e4b_self_audit_v4"
  ],
  "examples": 25,
  "instance_id": "gammapy__gammapy-5674",
  "problem_statement": "FluxPoints.resample_axis fails in 1.3\n**Gammapy version**\r\n1.3, dev\r\n\r\n\r\n\r\n**Bug description**\r\nFluxPoints.resample_axis raises an error\r\n\r\n\r\n\r\n\r\n**To Reproduce**\r\nIn the `analysis_2.py` tutorial, add at the end\r\n```\r\nfrom gammapy.estimators.utils import get_rebinned_axis\r\nax_new = get_rebinned_axis(fluxpoint=flux_points, method=\"min-ts\", ts_threshold=10)\r\nflux_points.resample_axis(ax_new)\r\n```\r\n\r\nThis fails with an error:\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\nCell In[40], line 1\r\n----> 1 flux_points.resample_axis(ax_new)\r\n\r\nFile ~/Gammapy-dev/gammapy/gammapy/estimators/points/core.py:869, in FluxPoints.resample_axis(self, axis_new)\r\n    867         edge_max = edge_max + axis_new.reference_time\r\n    868     fp = self.slice_by_coord({axis_new.name: slice(edge_min, edge_max)})\r\n--> 869     fp_new = squash_fluxpoints(fp, axis_new)\r\n    870     fluxpoints.append(fp_new)\r\n    872 return self.__class__.from_stack(fluxpoints, axis=axis_new)\r\n\r\nFile ~/Gammapy-dev/gammapy/gammapy/estimators/points/core.py:55, in squash_fluxpoints(flux_point, axis)\r\n     52 if axis.name != \"energy\":\r\n     53     geom = geom.to_cube([flux_point.geom.axes[\"energy\"]])\r\n---> 55 maps[\"norm\"] = Map.from_geom(geom, data=minimizer.x)\r\n     56 maps[\"norm_err\"] = Map.from_geom(\r\n     57     geom, data=np.sqrt(minimizer.hess_inv.todense()).reshape(geom.data_shape)\r\n     58 )\r\n     59 maps[\"n_dof\"] = Map.from_geom(geom, data=flux_point.geom.axes[axis.name].nbin)\r\n\r\nFile ~/Gammapy-dev/gammapy/gammapy/maps/core.py:304, in Map.from_geom(geom, meta, data, unit, dtype)\r\n    301     raise ValueError(\"Unrecognized geom type.\")\r\n    303 cls_out = Map._get_map_cls(map_type)\r\n--> 304 return cls_out(geom, data=data, meta=meta, unit=unit, dtype=dtype)\r\n\r\nFile ~/Gammapy-dev/gammapy/gammapy/maps/region/ndmap.py:56, in RegionNDMap.__init__(self, geom, data, dtype, meta, unit)\r\n     53     meta = {}\r\n     55 self._geom = geom\r\n---> 56 self.data = data\r\n     57 self.meta = meta\r\n     58 self._unit = u.Unit(unit)\r\n\r\nFile ~/Gammapy-dev/gammapy/gammapy/maps/region/ndmap.py:84, in RegionNDMap.data(self, value)\r\n     81         value = np.expand_dims(value, (-2, -1))\r\n     83 if self.geom.data_shape != value.shape:\r\n---> 84     raise ValueError(\r\n     85         f\"Input shape {input_shape} is not compatible with shape from geometry {self.geom.data_shape}\"\r\n     86     )\r\n     88 self._data = value\r\n\r\nValueError: Input shape (1,) is not compatible with shape from geometry (1, 1)\r\n```",
  "repo": "gammapy/gammapy",
  "source": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
  "source_sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
}
{
  "captured_at": "2026-11-12T17:06:59.476467+00:00",
  "membership": "archived training",
  "membership_evidence": "Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.",
  "name": "Preserved post-training task archive",
  "source": "Autoresearch-Arena/gemma-4-developer-agent",
  "source_revision": "016496de222aaafca0d4ee4c18efc63ba616f76e",
  "sources": [
    {
      "path": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
      "sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_hybrid_v3/verified_rft_messages.jsonl",
      "sha256": "bd326303eb127e8e5e08f03daf97bb88d79d19709d59f3f93f348bc56686a8df"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_onpolicy_v3/verified_rft_messages.jsonl",
      "sha256": "960c680e797e823a0d3a22f4b1d5ef60a72971373d703b877340b0c9126aaf68"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6a/verified_rft_messages.jsonl",
      "sha256": "f045b7ca5b3883a1e2eaee81e1c02a4a1b53dd7b7b36e98bacb2ba5823a15148"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6b/verified_rft_messages.jsonl",
      "sha256": "0f62460a9706eea5e1605255896f191ab00cb5706c5f1f2e1c293e9a718218dc"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7/verified_rft_messages.jsonl",
      "sha256": "e37f7bd675322f3f81500b73559d60d5f602ca0537bf19f5cb06332c728c7b72"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7b/verified_rft_messages.jsonl",
      "sha256": "b864bdc8695183433eef6e31cb8d33fad44ba3aded2170c1ade4ad5b2944ce23"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_self_audit_v4/verified_rft_messages.jsonl",
      "sha256": "0026023745afb8f3dc1c176dc7f7171157b4ad5a66656b524af218e8e19ceee6"
    },
    {
      "path": "v2/experiments/train_data/rft_e4b_aligned_v2/verified_rft_messages.jsonl",
      "sha256": "92a4515fee9d152b0d4c510ee3ce4caaaffe2003ba7584469f8027f174aab18c"
    },
    {
      "path": "v2/experiments/train_data/rft_v1/verified_rft_messages.jsonl",
      "sha256": "a42453ccd7ac7680b0a03865e8e7080bc8bf74c8d9d193b440c441ed46f8512b"
    },
    {
      "path": "v2/experiments/train_data/rft_v2/verified_rft_messages.jsonl",
      "sha256": "18f4b3bd7e651f83c6acab479c9475e3fa50dc652a384f309e97146983ac85ba"
    }
  ]
}