File tree Expand file tree Collapse file tree
autogalaxy/profiles/light/linear Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313intensities to be penalized by a smoothness prior.
1414"""
1515import inspect
16+ import itertools
1617import numpy as np
1718from typing import Dict , List , Optional
1819
@@ -45,6 +46,22 @@ class LightProfileLinear(LightProfile):
4546 profiles when performing a fit to data.
4647 """
4748
49+ _pytree_token_counter = itertools .count ()
50+ __exclude_identifier_fields__ = ("pytree_token" ,)
51+
52+ def __init__ (self , * args , ** kwargs ):
53+ super ().__init__ (* args , ** kwargs )
54+ self .pytree_token = next (LightProfileLinear ._pytree_token_counter )
55+
56+ def __hash__ (self ):
57+ return self .pytree_token
58+
59+ def __eq__ (self , other ):
60+ return (
61+ isinstance (other , LightProfileLinear )
62+ and self .pytree_token == other .pytree_token
63+ )
64+
4865 @property
4966 def regularization (self ):
5067 return None
You can’t perform that action at this time.
0 commit comments