How to use the mocpy.MOC.from_lonlat function in mocpy

To help you get started, we’ve selected a few mocpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ggreco77 / GWsky / GWsky / coverage.py View on Github external
airmass_start = [1, 2, 3, 4]
        airmass_end = [2, 3, 4, 5.8]
        snaps = ['s1', 's2', 's3','s4']

        aladin.md( "airmass@"+str(time_update))
        
        for i,j, snap in zip(airmass_start, airmass_end, snaps):
   
            snap = contour_ipix[(contour_ipix['airmass'] >= i) & (contour_ipix['airmass'] < j) ]
            moc_order = self.moc.moc_order(nside)

            #snap['RA[deg]'].unit = 'deg'
            #snap['DEC[deg]'].unit = 'deg'

            moc = MOC.from_lonlat( snap['RA[deg]'].T*u.deg, snap['DEC[deg]'].T*u.deg,
                                  moc_order )                # moc creation
            moc.write( 'snap', format = 'fits', )     # fits file

            if len(snap)!=0:
                aladin.send_file('snap')
                aladin.set_planeID(' '+str(i)+"
github ggreco77 / GWsky / GWsky / coverage.py View on Github external
meta = {'ipix': 'ipix table'})             # astropy table       

        mask = (contour_ipix['airmass']) >= 1 # clearing
        obs1 = contour_ipix[mask]

        mask2 = (obs1['airmass']) <= float(self.entry_airmass.get())  # airmass user values
        obs = obs1[mask2]

        #obs['RA[deg]'].unit = 'deg'
        #obs['DEC[deg]'].unit = 'deg'        
        
        nside = self.user.get_nside()

        #if len(obs)!=0:
        moc_order = self.moc.moc_order(nside)
        moc = MOC.from_lonlat( obs['RA[deg]'].T*u.deg, obs['DEC[deg]'].T*u.deg,
                              moc_order )                # moc creation
            
        moc.write( 'obs_airmass_', format = 'fits',)     # fits file

        if len(obs)!=0:
           aladin.send_file('obs_airmass_')
         
        return obs, moc
github ggreco77 / GWsky / GWsky / coverage.py View on Github external
contour_ipix = self.from_ipixs_to_moc(self.obs_time)
        
        airmass_start = [1, 2, 3, 4]
        airmass_end = [2, 3, 4, 5.8]

        aladin.md( "airmass@"+str(self.obs_time))
        
        for i,j in zip(airmass_start, airmass_end):
         
            snap_1 = contour_ipix[(contour_ipix['airmass'] >= i) & (contour_ipix['airmass'] < j) ]
            moc_order = self.moc.moc_order(nside)

            #snap_1['RA[deg]'].unit = 'deg'
            #snap_1['DEC[deg]'].unit = 'deg'

            moc = MOC.from_lonlat( snap_1['RA[deg]'].T*u.deg, snap_1['DEC[deg]'].T*u.deg,
                                  moc_order )                # moc creation
            
            moc.write( 'snap_airmass_'+'initial', format = 'fits',)     # fits file

            if len(snap_1)!=0:
                aladin.send_file('snap_airmass_'+'initial')
                aladin.rename(str(i)+"=

mocpy

MOC parsing and manipulation in Python

BSD-3-Clause
Latest version published 1 month ago

Package Health Score

78 / 100
Full package analysis