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
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
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
def flatSelectForm(request, path): '''Form for selecting flats''' context = { 'improc': SecondPassProcessor(path), 'path': Filesystem.getVirtualPath(path) } return render(request, 'reduction/flatFrameSelect.html', context)