hughesadam87 / PAME

Personal programs for fiber optic nanobiosensing simulations.
Other
5 stars 5 forks source link

order of events in updaing nanoparticle when changing x sample size #25

Open hughesadam87 opened 9 years ago

hughesadam87 commented 9 years ago

If making x 100 - 200 for example, fine w/ composite and basic materials but event triggers in mie seem to be out of order. Looks like update_cross() calls for k before narray is updated.

Traceback (most recent call last):
  File "/home/glue/anaconda/envs/fibersim/lib/python2.7/site-packages/traits/trait_notifiers.py", line 340, in __call__
    self.handler( *args )
  File "/home/glue/Desktop/fibersim/pame/mie_traits_v2.py", line 187, in _eshell_changed
    self.update_cross()
  File "/home/glue/Desktop/fibersim/pame/mie_traits_v2.py", line 337, in update_cross
    k=self.k_medium[i]
  File "/home/glue/Desktop/fibersim/pame/basic_material.py", line 83, in _get_karray
    return (2.0*math.pi*self.narray)/(self.lambdas)
ValueError: operands could not be broadcast together with shapes (100,) (1000,) 
^C^CTraceback (most recent call last):
  File "/home/glue/anaconda/envs/fibersim/lib/python2.7/site-packages/traitsui/qt4/toolkit.py", line 376, in eventFilter
    def eventFilter(self, object, event):
KeyboardInterrupt
^C