level1.py 704 Bytes
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

from ..common.delegate import Delegate

class Level1DataApi(object):
    """
    Level1 Data Operation Class
    """
    def __init__(self):
        self.pymodule = Delegate().load(sub_module = "mbi")
        self.stub = getattr(self.pymodule, "Level1DataApi")()
    
    def cutout(self, **kwargs):
        ''' cutout a level1 record from database

        :param kwargs: Parameter dictionary, key items support:
            ra: [float], in degree
            dec: [float], in degree
            pixels = [int],
            filters = list[str], for example:
                ['g', 'r', 'i']
        
        :returns: csst_dfs_common.models.Result
        '''
        return self.stub.cutout(**kwargs)