[repo] kind = "recipe" [recipe] description = "Crop and rotate each stacked FITS output" [[stages]] name = "crop" description = "Crop and rotate stacked FITS outputs" tool.name = "python" script = ''' from starbash.recipes import crop crop.logger = logger crop.context = context input_info = context["input"][0] output_info = context["output"] crop.crop_files( [input_info.full_paths[0]], [output_info.full_paths[0]], rotate_deg=context["parameters"].rotate_deg, crop_width=context["parameters"].crop_width, crop_height=context["parameters"].crop_height, ) ''' [[stages.inputs]] kind = "job" after = "stack_.*" multiplex = true [[stages.inputs.requires]] kind = "min_count" value = 1 [[stages.outputs]] kind = "processed" auto.prefix = "crop_" [[stages.parameters]] name = "crop_width" default = "80%" description = "Maximum crop width, in pixels or as a percentage of the source width" [[stages.parameters]] name = "crop_height" default = "80%" description = "Maximum crop height, in pixels or as a percentage of the source height" [[stages.parameters]] name = "rotate_deg" default = 0 description = "Rotation angle in degrees after cropping"