コード例 #1
0
ファイル: action_views.py プロジェクト: rovor/RedROVOR
def applyWCS(path):
    '''apply world coordinate system to 
    images'''
    try:
        improc = SecondPassProcessor(path)
        improc.applyWCS()
        return okJSONResponse()
    except Exception as e:
        #an unexpected exception
        logger.debug(traceback.format_exc()) #log the traceback
        raise e
コード例 #2
0
ファイル: action_views.py プロジェクト: rovor/RedROVOR
def applyWCS(path):
    '''apply world coordinate system to 
    images'''
    try:
        improc = SecondPassProcessor(path)
        improc.applyWCS()
        return okJSONResponse()
    except Exception as e:
        #an unexpected exception
        logger.debug(traceback.format_exc())  #log the traceback
        raise e
コード例 #3
0
ファイル: action_views.py プロジェクト: rovor/RedROVOR
def applyFlats(request,path):
    '''apply the given flats to the supplied path'''
    try:
        flats = json.loads(request.POST['flats'])
        for filt,flat in flats.items():
            flats[filt] = Filesystem.getTruePath(flat)
        improc = SecondPassProcessor(path)
        improc.applyFlats(flats)
        return okJSONResponse()
    except ValueError as e:
        return errorJSONResponse(str(e))
    except Exception as e:
        #an unexpected exception
        logger.debug(traceback.format_exc()) #log the traceback
        raise e
コード例 #4
0
ファイル: action_views.py プロジェクト: rovor/RedROVOR
def applyFlats(request, path):
    '''apply the given flats to the supplied path'''
    try:
        flats = json.loads(request.POST['flats'])
        for filt, flat in flats.items():
            flats[filt] = Filesystem.getTruePath(flat)
        improc = SecondPassProcessor(path)
        improc.applyFlats(flats)
        return okJSONResponse()
    except ValueError as e:
        return errorJSONResponse(str(e))
    except Exception as e:
        #an unexpected exception
        logger.debug(traceback.format_exc())  #log the traceback
        raise e
コード例 #5
0
def flatSelectForm(request, path):
    '''Form for selecting flats'''
    context = {
        'improc': SecondPassProcessor(path),
        'path': Filesystem.getVirtualPath(path)
    }
    return render(request, 'reduction/flatFrameSelect.html', context)