Beispiel #1
0
 def _calc_FoV(self):
     # dimensions of FoV did,sec,(x,y,z)
     self.FoV=zeros((3,8,3,self.nrp_sec))
     for sec in range(8):
         for ind,ang in enumerate(self.ang_sec):
             self.FoV[0,sec,:,ind*self.nrp_det:(ind+1)*self.nrp_det]=rotate(self.det1,self.rax,sec*45.+ang,deg=True).reshape(self.det1.shape)
             self.FoV[1,sec,:,ind*self.nrp_det:(ind+1)*self.nrp_det]=rotate(self.det2,self.rax,sec*45.+ang,deg=True).reshape(self.det2.shape)
             self.FoV[2,sec,:,ind*self.nrp_det:(ind+1)*self.nrp_det]=rotate(self.det3,self.rax,sec*45.+ang,deg=True).reshape(self.det3.shape)
Beispiel #2
0
 def calc_cosmuspecs(self,vswbins=arange(500.,800.1,10.),cosmubins=arange(-1.,1.01,.2),wbins=arange(-0.,2.1,.2),min_whe=0.9,bphibins=arange(-110,-69.9,10.),bthetabins=arange(-20,20.1,10.)):
     """
     Calculates w spectra. Data preselected by Master mask, i.e. Magnetic field direction.
     vsws -> bins for solar wind speed that are taken to calculate the instrumental coverage at w-bins
     """
     self.d.remove_submask("Master","vsw")
     self.d.remove_submask("Master","aspphi")
     self.d.remove_submask("Master","asptheta")
     self.d.set_mask("He1+","wHe1+2",min_whe,10.,reset=True)
     #for each combination of aspect angles and solar wind velocity the phase space coverage has to be calculated to calculate the weights for normalising the final histograms.
     norm_arr = zeros((wbins.shape[0]-1,cosmubins.shape[0]-1))
     cts_arr = zeros((wbins.shape[0]-1,cosmubins.shape[0]-1))
     ivoffset = int(around(vswbins[0]-500,-1)/10)
     self.d.set_mask("Master","vsw",vswbins[0],vswbins[-1],reset=True)
     for iphi,bphi in enumerate(bphibins[:-1]):
         for itheta,btheta in enumerate(bphibins[:-1]):
             self.d.set_mask("Master","Bphi",bphi,bphibins[iphi+1],reset=True)
             self.d.set_mask("Master","Btheta",btheta,bthetabins[iphi+1],reset=True)
             uTall,Tallind = unique(self.d.get_data("Master","d00"),return_index=True)
             uasphi = self.d.get_data("Master","aspphi")[Tallind]
             uasptheta = self.d.get_data("Master","asptheta")[Tallind]
             uvsw = self.d.get_data("Master","vsw")[Tallind]
             H,bs=histogramdd((uvsw,uasphi,uasptheta),bins=(vswbins,self.aspphi,self.asptheta))
             B0 = array([1.,0.,0.])
             rphiax = array([0.,0.,1.])
             rthetaax = rotate(array([0.,1.,0]),rphiax,bphi+5,deg=True)
             B = rotate(B0,rphiax,bphi+5,deg=True)
             B = rotate(B,rthetaax,btheta+5,deg=True)
             for iv,v in enumerate(vswbins[:-1]):
                 for ip,p in enumerate(self.aspphi[:-1]):
                     for it,t in enumerate(self.asptheta[:-1]):
                         if H[iv,ip,it]>0:
                             whe = self.vels/(v+5.)
                             epqs=arange(0,60,1)[whe>min_whe]
                             w3dspace=self.w3dspace[iv+ivoffset,ip,it,epqs]
                             wspace=self.wspace[iv+ivoffset,ip,it,epqs]
                             w3dspace[...,0,0]/=wspace[...,0,0]
                             w3dspace[...,1,0]/=wspace[...,0,0]
                             w3dspace[...,2,0]/=wspace[...,0,0]
                             cosmuspace=w3dspace[...,0,0]*B[0]+w3dspace[...,1,0]*B[1]+w3dspace[...,2,0]*B[2]
                             H2,xb,yb = histogram2d(wspace.flatten(),cosmuspace.flatten(),bins=(wbins,cosmubins))
                             norm_arr+=H2*H[iv,ip,it]
     self.d.set_mask("Master","Bphi",bphibins[0],bphibins[-1],reset=True)
     self.d.set_mask("Master","Btheta",bthetabins[0],bthetabins[-1],reset=True)
     wgts=self.d.get_data("He1+","wgts_sec")
     swgt=self.d.get_data("He1+","swt")
     wsw2=self.d.get_data("He1+","wsw2")
     cosmu=self.d.get_data("He1+","cosmu")
     H2,xb,yb = histogram2d(wsw2,cosmu,bins=(wbins,cosmubins),weights=(wgts*swgt))
     self.d.remove_submask("Master","Bphi")
     self.d.remove_submask("Master","Btheta")
     self.d.remove_submask("He1+","wHe1+2")
     self.d.remove_submask("Master","vsw")
     self.d.remove_submask("Master","aspphi")
     self.d.remove_submask("Master","asptheta")
     return norm_arr,H2
Beispiel #3
0
 def _calc_points(self):
     """
     Calculates the unrotatet slit, divided into detectors 1,2,3.
     rax is the axis from which the entrance slit can be constructed by rotating the vector (1,0,0) by ang_para (full 90 degrees, resulting in an opening angle of the collimator of ~70 deg against the x-y plane). Each detector is assumed to cover 30 deg. The opening in the x-y plane is +-2 deg.
     det1,2,3 are a representation of the collimator in this coordinate system. And has to be rotated to the actual scientific cordinates. This is done later on by, first rotate to the actual spin axis direction (_rot_aspang) , then to the direction where the rotation is started,i.e. the sun-pulse is triggered (_rot_seczero).
     """
     rax = array([cos(56./180.*pi),sin(56./180.*pi),0])
     for i,ang in enumerate(self.ang_perp):
         self.base_points[:,i]=array([cos(ang/180.*pi),sin(ang/180.*pi),0])
     for i,ang in enumerate(self.ang_para):
         self.det1[:,i*self.nrs_perp:(i+1)*self.nrs_perp]=rotate(self.base_points,rax,ang,deg=True).reshape(self.base_points.shape)
         self.det2[:,i*self.nrs_perp:(i+1)*self.nrs_perp]=rotate(self.base_points,rax,ang-30.,deg=True).reshape(self.base_points.shape)
         self.det3[:,i*self.nrs_perp:(i+1)*self.nrs_perp]=rotate(self.base_points,rax,ang-60.,deg=True).reshape(self.base_points.shape)
Beispiel #4
0
def hc_to_hg(hc_vec, degree=True, long_shift=180.):
    '''
    Transformation of a vector from heliocentric to heliographic coordinate system.
    :param hc_vec: Heliocentric vector [R,long,lat] where lat increases towards +z axis
    :param degree: True when angles are given in degrees (False when in radians)
    :param long_shift: Ulysses HG-long-data is shifted by pi (long=0 shifted by 75+180 deg against vernal equinox)
    :return: vector [R,long,lat] in heliographic coordinates where lat increases towards +z axis and long according to long_shift
    '''
    hc_cart = sph2cart([hc_vec[0], hc_vec[1], 90 - hc_vec[2]], deg=degree)
    int1 = rotate(hc_cart, 'z', -75.062, deg=degree)
    int2 = rotate(int1, 'x', -7.25, deg=degree)
    int3 = cart2sph(int2, deg=degree)
    return array([int3[0], long_shift + int3[1], 90 - int3[2]])
Beispiel #5
0
def hg_to_hc(hg_vec, degree=True, long_shift=0.):
    '''
    Transformation of a vector from heliographic to heliocentric coordinate system
    :param hg_vec: Heliographic vector [R,long,lat] where lat increases towards +z axis, long: s. long_shift if using Ulysses data
    :param degree: True when angles are given in degrees (False when in radians)
    :param long_shift: Ulysses HG-long-data is shifted by pi (long=0 shifted by 75+180 deg against vernal equinox)
    :return: vector [R,long,lat] in heliocentric coordinates where lat increases towards +z axis
    '''
    hg_cart = sph2cart([hg_vec[0], hg_vec[1] - long_shift, 90. - hg_vec[2]],
                       deg=degree)
    int1 = rotate(hg_cart, 'x', 7.25, deg=degree)
    int2 = rotate(int1, 'z', 75.062, deg=degree)
    int3 = cart2sph(int2, deg=degree)
    return array([int3[0], int3[1], 90. - int3[2]])
Beispiel #6
0
    def plot_rot(self,ang=0.,ax=None):
        if ax == None:
            fig = plt.figure()
            ax = fig.add_subplot(111, projection='3d')
            ax.set_xlim(0.,1)
            ax.set_ylim(-1.,1)
            ax.set_zlim(-1.,1)
            ax.set_xlabel("x")
            ax.set_ylabel("y")
            ax.set_zlabel("z")
        det1_rot = rotate(self.det1,self.rax,ang,deg=True).reshape(self.det1.shape)
        det2_rot = rotate(self.det2,self.rax,ang,deg=True).reshape(self.det2.shape)
        det3_rot = rotate(self.det3,self.rax,ang,deg=True).reshape(self.det3.shape)

        ax.plot(det1_rot[0,:],det1_rot[1,:],det1_rot[2,:],"o",color="k")
        ax.plot(det2_rot[0,:],det2_rot[1,:],det2_rot[2,:],"o",color="b")
        ax.plot(det3_rot[0,:],det3_rot[1,:],det3_rot[2,:],"o",color="r")
        return ax
Beispiel #7
0
 def _rot_seczero(self):
     """
     Rotates slit to 135 (90???) degrees against sun pulse trigger,i.e. the starting position for sector 0
     The angle of 135 degrees has been inferred from a technical drawing of the ACE-SC. It looks like the detector view direction is 135 deg ahead of the sun-pulse. Which means that the sun-pulse direction is typically reached at sector 5!
     """
     # Sunpulser viewing direction at spin start,i.e. start of sec0 (in plane spanned by spin axis and SC-Sun line, perpendicular to spin axis)
     self.spax = cross(self.rax,cross(array([1.,0.,0.]),self.rax))
     self.spax/=sqrt(sum(self.spax**2))
     # Sunpulser angle relative to Swics Z-Axis 
     self.spang = arccos(dot(self.spax,self.rzax))/pi*180.
     # Rotate slit to Sector 0 starting Position, i.e. rotate by 90-spang
     #print self.spang
     if self.aspphi<0.:
         self.sec0ang= 135 - self.spang
     else:
         self.sec0ang=(135 + self.spang)
     self.det1 = rotate(self.det1,self.rax,self.sec0ang,deg=True).reshape(self.det1.shape)
     self.det2 = rotate(self.det2,self.rax,self.sec0ang,deg=True).reshape(self.det2.shape)
     self.det3 = rotate(self.det3,self.rax,self.sec0ang,deg=True).reshape(self.det3.shape)
Beispiel #8
0
 def _rot_seczero(self):
     """
     Rotates slit to 135 degrees against sun pulse trigger,i.e. the starting position for sector 0
     """
     # Sunpulser viewing direction at spin start,i.e. start of sec0 (in plane spanned by spin axis and SC-Sun line, perpendicular to spin axis)
     self.spax = cross(self.rax, cross(array([1., 0., 0.]), self.rax))
     self.spax /= sqrt(sum(self.spax**2))
     # Sunpulser angle relative to Swics Z-Axis
     self.spang = arccos(dot(self.spax, self.rzax)) / pi * 180.
     # Rotate slit to Sector 0 starting Position, i.e. rotate by 135-spang
     if self.aspphi < 0.:
         self.sec0ang = 90 - self.spang
     else:
         self.sec0ang = (90 + self.spang)
     self.det1 = rotate(self.det1, self.rax, self.sec0ang,
                        deg=True).reshape(self.det1.shape)
     self.det2 = rotate(self.det2, self.rax, self.sec0ang,
                        deg=True).reshape(self.det2.shape)
     self.det3 = rotate(self.det3, self.rax, self.sec0ang,
                        deg=True).reshape(self.det3.shape)
Beispiel #9
0
 def _calc_points(self):
     """
     Calculates the unrotatet slit, divided into detectors 1,2,3.
     """
     rax = array([cos(56. / 180. * pi), sin(56. / 180. * pi), 0])
     if self.calc_full:
         for i, ang in enumerate(self.ang_perp):
             self.base_points[:, i] = array(
                 [cos(ang / 180. * pi),
                  sin(ang / 180. * pi), 0])
         for i, ang in enumerate(self.ang_para[self.md1]):
             self.det1[:, i * self.ang_perp.shape[0]:(i + 1) *
                       self.ang_perp.shape[0]] = rotate(
                           self.base_points, rax, ang,
                           deg=True).reshape(self.base_points.shape)
         for i, ang in enumerate(self.ang_para[self.md2]):
             self.det2[:, i * self.ang_perp.shape[0]:(i + 1) *
                       self.ang_perp.shape[0]] = rotate(
                           self.base_points, rax, ang,
                           deg=True).reshape(self.base_points.shape)
         for i, ang in enumerate(self.ang_para[self.md3]):
             self.det3[:, i * self.ang_perp.shape[0]:(i + 1) *
                       self.ang_perp.shape[0]] = rotate(
                           self.base_points, rax, ang,
                           deg=True).reshape(self.base_points.shape)
     else:
         self.base_points = zeros((3, 1))
         self.base_points[0] = 1.
         self.det1 = zeros((3, 1))
         self.det2 = zeros((3, 1))
         self.det3 = zeros((3, 1))
         self.det1[:, 0] = rotate(self.base_points, rax, -15, deg=True)
         self.det2[:, 0] = rotate(self.base_points, rax, -45, deg=True)
         self.det3[:, 0] = rotate(self.base_points, rax, -75, deg=True)
Beispiel #10
0
def hg_to_rtn(r_vec,
              sc_vec,
              spherical=True,
              degr=True,
              long_shift=180.,
              long_shift_r=0.):
    '''
    Transforms heliographic coordinates from vector r_vec to coordinates as seen from an RTN-system (centered at the Sun)s.
    ('active Rotation')
    !! Theta is 90deg when only z-component
    :param r_vec: in spherical heliographic coordinates (r,long,lat)
    :param sc_vec: in spherical heliographic coordinates (r,long,lat)
    :param long_shift: Ulysses HG-long-data is shifted by pi (long=0 shifted by 75+180 deg against vernal equinox)
    :param long_shift_r: needs to be pi as well, when r_vec is sc_vec itself & SC is Ulysses data ('Ulysses in RTN')
    :return: cartesian coordinates in RTN-system
    '''
    if spherical:
        r_vec_2conv = array(
            [r_vec[0], r_vec[1] - long_shift_r,
             90. - r_vec[2]])  # conversion to 'classical' theta-definition
        # print("r_vec_2conv:")
        # print(r_vec_2conv)
        r_vec_cart = sph2cart(r_vec_2conv, deg=degr)
        # print("\n r_vec_cart:")
        # print(r_vec_cart)
    if degr:
        interim_1 = rotate(r_vec_cart,
                           'z',
                           -(sc_vec[1] - 90 - long_shift),
                           deg=True)
        # print("\n interim_1:")
        # print(interim_1)
        interim_2 = rotate(interim_1, 'x', -sc_vec[2], deg=True)
        # print("\n interim_2:")
        # print(interim_2)
        R, T, N = rotate(interim_2, 'z', -90., deg=True)
    return array([R, T, N])
Beispiel #11
0
 def _calc_FoV(self):
     if self.calc_full:
         angsteps = range(0, 45, 3)
         # dimensions of FoV did,sec,(x,y,z)
         self.FoV = zeros((3, 8, 3, 150 * len(angsteps)))
         for sec in range(8):
             for ang in angsteps:
                 ind = ang / 3
                 self.FoV[0, sec, :, ind * 150:(ind + 1) *
                          150] = rotate(self.det1,
                                        self.rax,
                                        sec * 45. + ang,
                                        deg=True).reshape(self.det1.shape)
                 self.FoV[1, sec, :, ind * 150:(ind + 1) *
                          150] = rotate(self.det2,
                                        self.rax,
                                        sec * 45. + ang,
                                        deg=True).reshape(self.det2.shape)
                 self.FoV[2, sec, :,
                          ind * 150:(ind + 1) * 150] = rotate(
                              self.det3,
                              self.rax,
                              sec * 45. + ang,
                              deg=True).reshape(self.det3.shape)[:, 0:150]
     else:
         angstep = 22.5
         self.FoV = zeros((3, 8, 3, 1))
         for sec in range(8):
             self.FoV[0, sec, :, 0] = rotate(self.det1,
                                             self.rax,
                                             sec * 45. + angstep,
                                             deg=True)
             self.FoV[1, sec, :, 0] = rotate(self.det2,
                                             self.rax,
                                             sec * 45. + angstep,
                                             deg=True)
             self.FoV[2, sec, :, 0] = rotate(self.det3,
                                             self.rax,
                                             sec * 45. + angstep,
                                             deg=True)
Beispiel #12
0
    def calc_muspec(self,vsws=arange(495.,800.,10.),wbins=arange(0.,5.1,.1),min_whe=0.9,bphi=90.,btheta=0.,dbphi=10.,dbtheta=10.,cosmubins=arange(-1.,1.01,.1)):
        """
        Calculates pitch-angle over w spectra. Data preselected by Master mask.
        vsws -> bins for solar wind speed that are taken to calculate the instrumental coverage at w-bins
        """
        self.d.remove_submask("Master","vsw")
        self.d.remove_submask("Master","aspphi")
        self.d.remove_submask("Master","asptheta")
        self.d.remove_submask("Master","Bphi")
        self.d.remove_submask("Master","Btheta")
        self.d.set_mask("He1+","wHe1+2",min_whe,10.,reset=True)
        self.d.set_mask("Master","Bphi",bphi-dbphi,bphi+dbphi,reset=True)
        self.d.set_mask("Master","Btheta",btheta-dbtheta,btheta+dbtheta,reset=True)
        #for each combination of aspect angles and solar wind velocity the phase space coverage has to be calculated to calculate the weights for normalising the final histograms.
        norm_arr = zeros((wbins.shape[0]-1,cosmubins.shape[0]-1))
        cts_arr = zeros((wbins.shape[0]-1,cosmubins.shape[0]-1))
        B0 = array([1.,0.,0.])
        rphiax = array([0.,0.,1.])
        rthetaax = rotate(array([0.,1.,0]),rphiax,bphi,deg=True)
        B = rotate(B0,rphiax,bphi,deg=True)
        B = rotate(B,rthetaax,btheta,deg=True)

        for v in vsws.astype(int):
            self.d.set_mask("Master","vsw",v,v+10.,reset=True)
            print v
            for phi in self.aspphi[:-1]:
                self.d.set_mask("Master","aspphi",phi-0.5,phi+0.5,reset=True)
                for theta in self.asptheta[:-1]:
                    self.d.set_mask("Master","asptheta",theta-0.5,theta+0.5,reset=True)
                    # All times (after Master mask) under which particles could have been measured under given aspect angle and solar wind speed
                    uTall,Tallind = unique(self.d.get_data("Master","d00"),return_index=True)
                    if uTall.shape[0]==0.:
                        pass
                    else:
                        phiind = searchsorted(self.aspphi,phi)
                        thetaind = searchsorted(self.asptheta,theta)
                        whe = self.vels[1]/(v+5.)
                        epqs=arange(0,60,1)[whe>min_whe]
                        wspace=self.vspace[phiind,thetaind,epqs]
                        wspace[:,:,:,0,:]-=(v+5.)
                        wspace/=(v+5.)
                        wcov = sqrt(sum(wspace**2,axis=3))
                        ewspace=1.*wspace
                        ewspace[:,:,:,0]=wspace[:,:,:,0]/wcov[:,:,:]
                        ewspace[:,:,:,1]=wspace[:,:,:,1]/wcov[:,:,:]
                        ewspace[:,:,:,2]=wspace[:,:,:,2]/wcov[:,:,:]
                        cosmu = ewspace[:,:,:,0,:]*B[0]+ewspace[:,:,:,1,:]*B[1]+ewspace[:,:,:,2,:]*B[2]
                        H,xbins,ybins = histogram2d(wcov.flatten(),cosmu.flatten(),bins=(wbins,cosmubins))
                        norm_arr+=H*uTall.shape[0]
                        wgts=self.d.get_data("He1+","wgts_sec")
                        ws=self.d.get_data("He1+","wsw2")
                        wxsw=self.d.get_data("He1+","wxsw2")
                        cmu =self.d.get_data("He1+","cosmu") 
                        swgt=self.d.get_data("He1+","swt")
                        H,xbins,ybins = histogram2d(ws,cmu,bins=(wbins,cosmubins),weights=wgts*swgt)
                        cts_arr+=H
        self.d.remove_submask("He1+","wHe1+2")
        self.d.remove_submask("Master","vsw")
        self.d.remove_submask("Master","aspphi")
        self.d.remove_submask("Master","asptheta")
        self.d.remove_submask("Master","Bphi")
        self.d.remove_submask("Master","Btheta")
        return cts_arr,norm_arr,xbins,ybins
Beispiel #13
0
 def _rot_aspang(self):
     """
     Calculates axes for spacecraft spin axis and rotates the slit to the starting position for sector 0.
     """
     # Axes for aspect phi and theta angle rotations
     self.rphiax = array([0., 0., 1.])
     self.rthetaax = rotate(array([0., 1., 0]),
                            self.rphiax,
                            self.aspphi,
                            deg=True)
     # Spacecraft Z-Axis (Spacecraft rotation axis, direction mostly Sunward)
     self.rax = rotate(array([1., 0., 0.]),
                       self.rphiax,
                       self.aspphi,
                       deg=True)
     self.rax = rotate(self.rax, self.rthetaax, -self.asptheta, deg=True)
     # Swics Z-Axis relative to rotation axis
     self.rzax = rotate(array([0., 0., 1.]),
                        self.rphiax,
                        self.aspphi,
                        deg=True)
     self.rzax = rotate(self.rzax, self.rthetaax, -self.asptheta, deg=True)
     # Rotate detectors in phi direction
     det1_rot = rotate(self.det1, self.rphiax, self.aspphi,
                       deg=True).reshape(self.det1.shape)
     det2_rot = rotate(self.det2, self.rphiax, self.aspphi,
                       deg=True).reshape(self.det2.shape)
     det3_rot = rotate(self.det3, self.rphiax, self.aspphi,
                       deg=True).reshape(self.det3.shape)
     # Rotate detectors in theta direction
     self.det1 = rotate(det1_rot, self.rthetaax, -self.asptheta,
                        deg=True).reshape(self.det1.shape)
     self.det2 = rotate(det2_rot, self.rthetaax, -self.asptheta,
                        deg=True).reshape(self.det2.shape)
     self.det3 = rotate(det3_rot, self.rthetaax, -self.asptheta,
                        deg=True).reshape(self.det3.shape)
Beispiel #14
0
 def _rot_aspang(self):
     """
     Calculates axes for spacecraft spin axis and rotates the slit to the starting position for sector 0.
     Coordinates GSE(basically SpacecraftSunEcliptic x-> Spacecraft-Sun,y -> Against Earth(Spacecraft) Orbit in ecliptic. z -> Out of ecliptic (North)
     SpaceCraft-Spin-Axis is then defined by first rotate (1,0,0) by in ecliptic aspect angle (phi) around (0,0,1) (for ACE-SWICS for Ulysses-SWICS it might be different and Axis might be different). Then the vector is rotated out of the ecliptic by rotating around the also rotated y-Axis by the out of ecliptic aspect angle. This angle is right now defined as 0 in ecliptic positve angle north ,i.e above the ecliptic. Because definition is against the typical sense of rotation in an right-handed system, the rotation actually has to be done by the negative angle.
     """
     # Axes for aspect phi and theta angle rotations
     self.rphiax = array([0.,0.,1.])
     self.rthetaax = rotate(array([0.,1.,0]),self.rphiax,self.aspphi,deg=True)
     # Spacecraft Z-Axis (Spacecraft rotation axis, direction mostly Sunward)
     self.rax = rotate(array([1.,0.,0.]),self.rphiax,self.aspphi,deg=True)
     self.rax = rotate(self.rax,self.rthetaax,-self.asptheta,deg=True)
     # Swics Z-Axis relative to rotation axis
     self.rzax = rotate(array([0.,0.,1.]),self.rphiax,self.aspphi,deg=True)
     self.rzax = rotate(self.rzax,self.rthetaax,-self.asptheta,deg=True)
     # Rotate detectors in phi direction
     det1_rot = rotate(self.det1,self.rphiax,self.aspphi,deg=True).reshape(self.det1.shape)
     det2_rot = rotate(self.det2,self.rphiax,self.aspphi,deg=True).reshape(self.det2.shape)
     det3_rot = rotate(self.det3,self.rphiax,self.aspphi,deg=True).reshape(self.det3.shape)
     # Rotate detectors in theta direction (because of theta beeing defined with opposite sense of rotation,i.e. 0 in ecliptic and positive values northward out of the ecliptic)
     self.det1 = rotate(det1_rot,self.rthetaax,-self.asptheta,deg=True).reshape(self.det1.shape)
     self.det2 = rotate(det2_rot,self.rthetaax,-self.asptheta,deg=True).reshape(self.det2.shape)
     self.det3 = rotate(det3_rot,self.rthetaax,-self.asptheta,deg=True).reshape(self.det3.shape)