Skip to content

Commit

Permalink
Make transform_at_index not cache again because it makes the answers
Browse files Browse the repository at this point in the history
wrong
  • Loading branch information
SolarDrew committed Mar 8, 2024
1 parent 915a34e commit 99a82bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dkist/wcs/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from abc import ABC
from typing import Union, Literal, Iterable
from functools import cache
# from functools import cache
from itertools import product

import numpy as np
Expand Down Expand Up @@ -157,7 +157,7 @@ def __init__(self, *args, crval_table=None, pc_table=None, projection=m.Pix2Sky_
raise TypeError("The projection keyword should be a Pix2SkyProjection model class.")
self.projection = projection

@cache
# @cache
def transform_at_index(self, ind, crpix=None, cdelt=None, lon_pole=None):
"""
Generate a spatial model based on an index for the pc and crval tables.
Expand Down Expand Up @@ -220,7 +220,7 @@ def _map_transform(self, *arrays, crpix, cdelt, lon_pole, inverse=False):
ranges = [np.unique(ind) for ind in inds]
for ind in product(*ranges):
# Scalar parameters are reshaped to be length one arrays by modeling
sct = self.transform_at_index(ind)
sct = self.transform_at_index(ind, crpix=crpix[0], cdelt=cdelt[0], lon_pole=lon_pole[0])

# Call this transform for all values of x, y where z == zind
masks = [inds[i] == ind[i] for i in range(len(ind))]
Expand Down

0 comments on commit 99a82bb

Please sign in to comment.