Skip to content
Snippets Groups Projects
Select Git revision
  • f63db0b906872b3aef71f24813f239e40cd2ee9f
  • master default protected
  • auto-di-selection
  • ddcal_validation
  • split_convert_DIS_to_H5parm
  • auto_dical
  • finalcal
  • facet-imaging
  • image-1asec
  • astrometry
  • stacked-selfcal
  • ateamclipper_freqstep
  • widefield
  • inspect_subtract
  • update-outputs
  • facet_selfcal
  • 0.8.0 protected
  • 0.7.1 protected
  • 0.7.0 protected
  • v0.6 protected
  • v0.5 protected
21 results

target_solve.cwl

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    target_solve.cwl 1.94 KiB
    cwlVersion: v1.2
    class: CommandLineTool
    id: target_solve
    label: Target Solve
    doc: |
      This tool performs selfcalibration on the target source. 
      It uses the facetselfcal.py script from the LOFAR helper scripts with the --auto setting.
    
    baseCommand:
        - python3
        - delay_solve.py
    
    inputs:
        - id: msin
          type: Directory
          doc: Delay calibrator measurement set.
        - id: configfile
          type: File
          doc: Configuration options for self-calibration.
        - id: selfcal
          type: Directory
          doc: External self-calibration script.
        - id: h5merger
          type: Directory
          doc: External LOFAR helper scripts for merging h5 files.
    
    outputs:
        - id: images
          type: File[]
          outputBinding:
            glob: '*.png'
        - id: fits_images
          type: File[]
          outputBinding:
            glob: '*MFS-image.fits'
        - id: logfile
          type: File[]
          outputBinding:
             glob: target_solve*.log
    
    requirements:
      - class: ShellCommandRequirement
      - class: InlineJavascriptRequirement
      - class: InitialWorkDirRequirement
        listing:
          - entry: $(inputs.configfile)
          - entry: $(inputs.msin)
          - entry: $(inputs.h5merger)
          - entryname: delay_solve.py
            entry: |
              import subprocess
              import sys
              import json
    
              inputs = json.loads(r"""$(inputs)""")
                
              msin = inputs['msin']['basename']
              configfile = inputs['configfile']['path']
              selfcal = inputs['selfcal']['path']
              h5merge = inputs['h5merger']['path']
    
              imagename = msin.split('.copy')[0]
    
              subprocess.run(f'python3 {selfcal}/facetselfcal.py {msin} --helperscriptspath {selfcal} 
                --helperscriptspathh5merge {h5merge} --weightspectrum-clipvalue 30.0 --auto --imagename {imagename}', shell = True)
    
    hints:
      - class: DockerRequirement
        dockerPull: vlbi-cwl
      - class: ResourceRequirement