@@ -89,7 +89,7 @@ def getData(self):
8989
9090 def getModelAsJson (self ):
9191 # TODO: netpyne should offer a method asJSON (#240)
92- # that returns the JSON model without dumping to to disk.
92+ # that returns the JSON model without dumping to to disk.
9393 obj = netpyne_utils .replaceFuncObj (self .netParams .__dict__ )
9494 obj = netpyne_utils .replaceDictODict (obj )
9595 return obj
@@ -275,7 +275,7 @@ def simulateNetPyNEModelInGeppetto(self, args):
275275 if experiment :
276276 if self .experiments .any_in_state ([model .ExperimentState .PENDING , model .ExperimentState .SIMULATING ]):
277277 return utils .getJSONError ("Experiment is already simulating or pending" , "" )
278-
278+
279279 if simulations .local .is_running ():
280280 simulations .local .stop ()
281281
@@ -285,7 +285,7 @@ def simulateNetPyNEModelInGeppetto(self, args):
285285 if allTrials :
286286 if len (experiment .trials ) == 1 and experiment .trials [0 ].id == experiments .BASE_TRIAL_ID :
287287 # special case where we don't want to run a batch simulation
288- return self .simulate_single_model (experiment , use_prev_inst )
288+ return self .simulate_single_model (experiment , use_prev_inst )
289289 else :
290290 return self .simulate_experiment_trials (experiment )
291291 else :
@@ -808,9 +808,37 @@ def getAvailableSections(self):
808808 sections [cellRule ] = list (self .netParams .cellParams [cellRule ]['secs' ].keys ())
809809 return sections
810810
811+ def getAvailableCellTypes (self ):
812+ cell_types = set ([])
813+ cell_types .add ('all' )
814+ for p in self .netParams .cellParams :
815+ cell_types .add (p )
816+ return sorted (cell_types )
817+
818+ def getAvailableRxDSections (self , selectedRegion ):
819+ sections = set ([])
820+ sections .add ('all' )
821+ if self .netParams .rxdParams .regions [selectedRegion ].get ('cells' ):
822+ if 'all' in self .netParams .rxdParams .regions [selectedRegion ]['cells' ]:
823+ for cellRule in self .netParams .cellParams :
824+ for cellSect in self .netParams .cellParams [cellRule ]['secs' ]:
825+ sections .add (cellSect )
826+ else :
827+ for cellRule in self .netParams .cellParams :
828+ if cellRule in self .netParams .rxdParams .regions [selectedRegion ]['cells' ]:
829+ for cellSect in self .netParams .cellParams [cellRule ]['secs' ]:
830+ sections .add (cellSect )
831+ return sorted (sections )
832+
811833 def getAvailableStimSources (self ):
812834 return list (self .netParams .stimSourceParams .keys ())
813835
836+ def getAvailableRxdRegions (self ):
837+ return list (self .netParams .rxdParams .regions .keys ())
838+
839+ def getAvailableRxdSpecies (self ):
840+ return list (self .netParams .rxdParams .species .keys ())
841+
814842 def getAvailableSynMech (self ):
815843 return list (self .netParams .synMechParams .keys ())
816844
0 commit comments