Skip to content

Commit

Permalink
remove further references to pandas Panel
Browse files Browse the repository at this point in the history
  • Loading branch information
apetri committed Jan 21, 2021
1 parent 197e1fd commit 766cbab
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
@@ -1,5 +1,10 @@
.. :changelog:
1.2
+++

- Support for weak lensing flexion analysis (courtesy of Brij Patel, brp53@drexel.edu)

1.0
+++

Expand Down
47 changes: 16 additions & 31 deletions lenstools/statistics/constraints.py
Expand Up @@ -38,7 +38,7 @@
#########################################################

from ..utils.algorithms import precision_bias_correction
from .ensemble import Series,Ensemble,Panel
from .ensemble import Series,Ensemble
from . import samplers

#########################################################
Expand Down Expand Up @@ -435,7 +435,7 @@ def _constructor_sliced(self):

@property
def _constructor_expanddim(self):
return FisherPanel
raise NotImplementedError("Expand dimension not supported")

#################################################################

Expand Down Expand Up @@ -902,14 +902,6 @@ def reparametrize(self,formatter,*args,**kwargs):
#Check that the format of the parameter set is valid
self.check()


class FisherPanel(Panel):

@property
def _constructor_sliced(self):
return FisherAnalysis


#######################################################
#############Full analysis#############################
#######################################################
Expand Down Expand Up @@ -939,7 +931,7 @@ def _constructor_sliced(self):

@property
def _constructor_expanddim(self):
return EmulatorPanel
raise NotImplementedError("Expand dimension not supported")

##################################
########Constructor###############
Expand Down Expand Up @@ -1248,16 +1240,16 @@ def score(self,parameters,observed_feature,method="chi2",**kwargs):
Compute the score for an observed feature for each combination of the proposed parameters
:param parameters: parameter combinations to score
:type parameters: DataFrame or array
:type parameters: DataFrame or array
:param observed_feature: observed feature to score
:type observed_feature: Series
:param observed_feature: observed feature to score
:type observed_feature: Series
:param method: scoring method to use (defaults to chi2): if callable, must take in the current instance, the parameter array and the observed feature and return a score for each parameter combination
:type method: str. or callable
:param method: scoring method to use (defaults to chi2): if callable, must take in the current instance, the parameter array and the observed feature and return a score for each parameter combination
:type method: str. or callable
:param kwargs: keyword arguments passed to the callable method
:type kwargs: dict.
:param kwargs: keyword arguments passed to the callable method
:type kwargs: dict.
:returns: ensemble with the scores, for each feature
:rtype: :py:class:`Ensemble`
Expand Down Expand Up @@ -1317,14 +1309,14 @@ def sample_posterior(self,observed_feature,sample="emcee",**kwargs):
"""
Sample the parameter posterior distribution
:param observed_feature: observed feature to score
:type observed_feature: Series
:param observed_feature: observed feature to score
:type observed_feature: Series
:param sample: posterior sampling method
:type sample: str. or callable
:param sample: posterior sampling method
:type sample: str. or callable
:returns: samples from the posterior distribution
:rtype: dict.
:returns: samples from the posterior distribution
:rtype: dict.
"""

Expand Down Expand Up @@ -1417,13 +1409,6 @@ def emulate(self,new_feature_label):
#return self._current_interpolated_feature(new_feature_label)
raise NotImplementedError


class EmulatorPanel(Panel):

@property
def _constructor_sliced(self):
return Emulator

#########################################################################################################################################################################################

###########################################################################
Expand Down
2 changes: 1 addition & 1 deletion lenstools/statistics/ensemble.py
Expand Up @@ -140,7 +140,7 @@ def _constructor_sliced(self):

@property
def _constructor_expanddim(self):
return Panel
raise NotImplementedError("Expand dimension not supported")

##################################
########Constructor###############
Expand Down

0 comments on commit 766cbab

Please sign in to comment.