Example #1
0
    def calcMagneticModel(self):
        self.I = self.params['i0'] * sphere_cs.magnetic_formfactor(
            self.q,
            self.params['r'],
            self.params['d'],
            self.params['sldCore'],
            self.params['sldShell'],
            self.params['sldSolvent'],
            self.params['sigR'],
            self.params['sigD'],
            self.params['dDead'],
            self.params['magSldCore'],
            self.params['magSldShell'],
            self.params['magSldSolvent'],
            self.params['xi'],
            self.params['sin2alpha'],
            self.params['polarization'],
        ) + self.params['bg']

        self.r, self.sld = sphere_cs.sld(self.params['r'], self.params['d'],
                                         self.params['sldCore'],
                                         self.params['sldShell'],
                                         self.params['sldSolvent'])

        self.rMag, self.sldMag = sphere_cs.sld(
            self.params['r'] - self.params['dDead'], self.params['d'],
            self.params['magSldCore'], self.params['magSldShell'],
            self.params['magSldSolvent'])
Example #2
0
    def calcModel(self):
        self.I = self.params['i0'] * (
            self.params['fraction'] * sphere_cs.formfactor(
                self.q, self.params['r1'], self.params['d'],
                self.params['sldCore'], self.params['sldShell'], self.params[
                    'sldSolvent'], self.params['sigR1'], self.params['sigD']) +
            (1 - self.params['fraction']) * sphere_cs.formfactor(
                self.q, self.params['r2'], self.params['d'],
                self.params['sldCore'], self.params['sldShell'],
                self.params['sldSolvent'], self.params['sigR2'], self.
                params['sigD'])) + self.params['i0Oleic'] * sphere.formfactor(
                    self.q, self.params['d'], self.params['sldOleic'],
                    self.params['sldSolvent'], 0) + self.params['bg']

        r1, sld1 = sphere_cs.sld(self.params['r1'], self.params['d'],
                                 self.params['sldCore'],
                                 self.params['sldShell'],
                                 self.params['sldSolvent'])

        r2, sld2 = sphere_cs.sld(self.params['r2'], self.params['d'],
                                 self.params['sldCore'],
                                 self.params['sldShell'],
                                 self.params['sldSolvent'])

        r3, sld3 = sphere.sld(self.params['d'], self.params['sldOleic'],
                              self.params['sldSolvent'])
        self.r = np.concatenate([r1, r1[::-1], r2, r2[::-1], r3])
        self.sld = np.concatenate([sld1, sld1[::-1], sld2, sld2[::-1], sld3])
Example #3
0
    def calcMagneticModel(self):
        self.I = self.params['i0'] * sphere_cs.magnetic_formfactor(
            self.q,
            self.params['r'],
            self.params['d'],
            self.params['sldCore'],
            self.params['sldShell'],
            self.params['sldSolvent'],
            self.params['sigR'],
            self.params['sigD'],
            self.params['dDead'],
            self.params['magSldCore'],
            self.params['magSldShell'],
            self.params['magSldSolvent'],
            self.params['xi'],
            self.params['sin2alpha'],
            self.params['polarization'],
        ) + self.params['i0Oleic'] * sphere.magnetic_formfactor(
            self.q, self.params['rOleic'], self.params['sldOleic'],
            self.params['sldSolvent'], 0, 0, 0, self.params['xi'],
            self.params['sin2alpha'],
            self.params['polarization']) + self.params['bg']

        r1, sld1 = sphere_cs.sld(self.params['r'], self.params['d'],
                                 self.params['sldCore'],
                                 self.params['sldShell'],
                                 self.params['sldSolvent'])

        r2, sld2 = sphere.sld(self.params['rOleic'], self.params['sldOleic'],
                              self.params['sldSolvent'])
        self.r = np.concatenate([r1, r1[::-1], r2])
        self.sld = np.concatenate([sld1, sld1[::-1], sld2])

        reducedR = self.params['r'] - self.params['dDead']
        if reducedR < 0:
            reducedR = 0
        rMag1, sldMag1 = sphere_cs.sld(reducedR, self.params['d'],
                                       self.params['magSldCore'],
                                       self.params['magSldShell'],
                                       self.params['magSldSolvent'])

        rMag2, sldMag2 = sphere.sld(self.params['rOleic'], 0, 0)
        self.rMag = np.concatenate([rMag1, rMag1[::-1], rMag2])
        self.sldMag = np.concatenate([sldMag1, sldMag1[::-1], sldMag2])
Example #4
0
    def calcModel(self):
        self.I = self.params['i0'] * sphere_cs.formfactor(
            self.q, self.params['r'], self.params['d'], self.params['sldCore'],
            self.params['sldShell'], self.params['sldSolvent'],
            self.params['sigR'], self.params['sigD']) + self.params['bg']

        self.r, self.sld = sphere_cs.sld(self.params['r'], self.params['d'],
                                         self.params['sldCore'],
                                         self.params['sldShell'],
                                         self.params['sldSolvent'])
Example #5
0
  def calcModel(self):
    self.I = self.params['i01'] * sphere_cs.formfactor(
      self.q,
      self.params['r1'],
      self.params['d1'],
      self.params['sldCore1'],
      self.params['sldShell1'],
      self.params['sldSolvent'],
      self.params['sigR1'],
      self.params['sigD1']
    ) + self.params['i02'] * sphere_cs.formfactor(
      self.q,
      self.params['r2'],
      self.params['d2'],
      self.params['sldCore2'],
      self.params['sldShell2'],
      self.params['sldSolvent'],
      self.params['sigR2'],
      self.params['sigD2']
    ) + self.params['bg']

    r1, sld1 = sphere_cs.sld(
      self.params['r1'],
      self.params['d1'],
      self.params['sldCore1'],
      self.params['sldShell1'],
      self.params['sldSolvent']
    )

    r2, sld2 = sphere_cs.sld(
      self.params['r2'],
      self.params['d2'],
      self.params['sldCore2'],
      self.params['sldShell2'],
      self.params['sldSolvent']
    )

    self.r = np.concatenate([r1, r1[::-1], r2])
    self.sld = np.concatenate([sld1, sld1[::-1], sld2])
Example #6
0
    def calcModel(self):
        self.I = self.params['i0'] * sphere_cs.formfactor(
            self.q, self.params['r'], self.params['d'], self.params['sldCore'],
            self.params['sldShell'], self.params['sldSolvent'],
            self.params['sigR'],
            self.params['sigD']) + self.params['i0Oleic'] * sphere.formfactor(
                self.q, self.params['rOleic'], self.params['sldOleic'],
                self.params['sldSolvent'], 0) + self.params['bg']

        r1, sld1 = sphere_cs.sld(self.params['r'], self.params['d'],
                                 self.params['sldCore'],
                                 self.params['sldShell'],
                                 self.params['sldSolvent'])

        r2, sld2 = sphere.sld(self.params['rOleic'], self.params['sldOleic'],
                              self.params['sldSolvent'])
        self.r = np.concatenate([r1, r1[::-1], r2])
        self.sld = np.concatenate([sld1, sld1[::-1], sld2])
Example #7
0
  def calcMagneticModel(self):
    self.I = self.params['i0'] * (
      (1-self.params['fraction']) * sphere_cs.magnetic_formfactor(
        self.q,
        self.params['r1'],
        self.params['d'],
        self.params['sldCore'],
        self.params['sldShell'],
        self.params['sldSolvent'],
        self.params['sigR1'],
        self.params['sigD'],
        self.params['dDead1'],
        self.params['magSldCore'],
        self.params['magSldShell'],
        self.params['magSldSolvent'],
        self.params['xi'],
        self.params['sin2alpha'],
        self.params['polarization'],
    ) + self.params['fraction'] * sphere_cs.magnetic_formfactor(
        self.q,
        self.params['r2'],
        self.params['d'],
        self.params['sldCore'],
        self.params['sldShell'],
        self.params['sldSolvent'],
        self.params['sigR2'],
        self.params['sigD'],
        self.params['dDead2'],
        self.params['magSldCore'],
        self.params['magSldShell'],
        self.params['magSldSolvent'],
        self.params['xi'],
        self.params['sin2alpha'],
        self.params['polarization'],
    )) + self.params['bg']


    r1, sld1 = sphere_cs.sld(
      self.params['r1'],
      self.params['d'],
      self.params['sldCore'],
      self.params['sldShell'],
      self.params['sldSolvent']
    )

    r2, sld2 = sphere_cs.sld(
      self.params['r2'],
      self.params['d'],
      self.params['sldCore'],
      self.params['sldShell'],
      self.params['sldSolvent']
    )
    self.r = np.concatenate([r1, r1[::-1], r2])
    self.sld = np.concatenate([sld1, sld1[::-1], sld2])

    rMag1, sldMag1 = sphere_cs.sld(
      self.params['r1']-self.params['dDead1'],
      self.params['d'],
      self.params['magSldCore'],
      self.params['magSldShell'],
      self.params['magSldSolvent']
    )

    rMag2, sldMag2 = sphere_cs.sld(
      self.params['r2']-self.params['dDead2'],
      self.params['d'],
      self.params['magSldCore'],
      self.params['magSldShell'],
      self.params['magSldSolvent']
    )
    self.rMag = np.concatenate([rMag1, rMag1[::-1], rMag2])
    self.sldMag = np.concatenate([sldMag1, sldMag1[::-1], sldMag2])
Example #8
0
    def calcMagneticModel(self):
        self.I = self.params['i0'] * (
            self.params['fraction'] * sphere_cs.magnetic_formfactor(
                self.q,
                self.params['r1'],
                self.params['d'],
                self.params['sldCore'],
                self.params['sldShell'],
                self.params['sldSolvent'],
                self.params['sigR1'],
                self.params['sigD'],
                self.params['dDead1'],
                self.params['magSldCore'],
                self.params['magSldShell'],
                self.params['magSldSolvent'],
                self.params['xi'],
                self.params['sin2alpha'],
                self.params['polarization'],
            ) + (1 - self.params['fraction']) * sphere_cs.magnetic_formfactor(
                self.q,
                self.params['r2'],
                self.params['d'],
                self.params['sldCore'],
                self.params['sldShell'],
                self.params['sldSolvent'],
                self.params['sigR2'],
                self.params['sigD'],
                self.params['dDead2'],
                self.params['magSldCore'],
                self.params['magSldShell'],
                self.params['magSldSolvent'],
                self.params['xi'],
                self.params['sin2alpha'],
                self.params['polarization'],
            )) + self.params['i0Oleic'] * sphere.magnetic_formfactor(
                self.q, self.params['d'], self.params['sldOleic'],
                self.params['sldSolvent'], 0, 0, 0, self.params['xi'],
                self.params['sin2alpha'],
                self.params['polarization']) + self.params['bg']

        r1, sld1 = sphere_cs.sld(self.params['r1'], self.params['d'],
                                 self.params['sldCore'],
                                 self.params['sldShell'],
                                 self.params['sldSolvent'])

        r2, sld2 = sphere_cs.sld(self.params['r2'], self.params['d'],
                                 self.params['sldCore'],
                                 self.params['sldShell'],
                                 self.params['sldSolvent'])

        r3, sld3 = sphere.sld(self.params['d'], self.params['sldOleic'],
                              self.params['sldSolvent'])
        self.r = np.concatenate([r1, r1[::-1], r2, r2[::-1], r3])
        self.sld = np.concatenate([sld1, sld1[::-1], sld2, sld2[::-1], sld3])

        reducedR1 = self.params['r1'] - self.params['dDead1']
        reducedR2 = self.params['r2'] - self.params['dDead2']
        if reducedR1 < 0:
            reducedR1 = 0
        if reducedR2 < 0:
            reducedR2 = 0

        rMag1, sldMag1 = sphere_cs.sld(reducedR1, self.params['d'],
                                       self.params['magSldCore'],
                                       self.params['magSldShell'],
                                       self.params['magSldSolvent'])

        rMag2, sldMag2 = sphere_cs.sld(reducedR2, self.params['d'],
                                       self.params['magSldCore'],
                                       self.params['magSldShell'],
                                       self.params['magSldSolvent'])

        rMag3, sldMag3 = sphere.sld(self.params['d'], 0, 0)
        self.rMag = np.concatenate(
            [rMag1, rMag1[::-1], rMag2, rMag2[::-1], rMag3])
        self.sldMag = np.concatenate(
            [sldMag1, sldMag1[::-1], sldMag2, sldMag2[::-1], sldMag3])