diff --git a/.github/workflows/offsets_pair_custom.yml b/.github/workflows/offsets_pair_custom.yml new file mode 100644 index 0000000..6bd25c5 --- /dev/null +++ b/.github/workflows/offsets_pair_custom.yml @@ -0,0 +1,132 @@ +# Add custom XML for ISCE2 denseOffsets step +name: Offsets_Pair_Custom +run-name: ${{ inputs.burstId }} + +on: + workflow_dispatch: + inputs: + reference: + type: string + required: true + description: Reference SLC + default: S1A_IW_SLC__1SDV_20230621T121402_20230621T121429_049084_05E705_BAD8 + secondary: + type: string + required: true + description: Secondary SLC + default: S1A_IW_SLC__1SDV_20231206T121407_20231206T121433_051534_06388C_D537 + burstId: + type: string + required: true + description: Secondary SLC + default: 012_023790_IW1 + polarization: + type: choice + required: true + description: Polarization + default: 'VV' + options: ['VV', 'VH', 'HH'] + looks: + type: choice + required: true + description: Range x Azimuth Looks + default: 20x4 + options: + - 20x4 + - 10x2 + - 5x1 + # Must duplicate inputs for workflow_call (https://github.com/orgs/community/discussions/39357) + workflow_call: + inputs: + reference: + type: string + required: true + secondary: + type: string + required: true + burstId: + type: string + required: true + polarization: + type: string + required: true + year: + type: string + required: true + looks: + type: string + required: true + jobname: + type: string + required: false + +jobs: + hyp3-isce2: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + repository: 'relativeorbit/hyp3-isce2' + ref: 'denseoffsetsSLCs' + + - name: Install Conda environment with Micromamba + uses: mamba-org/setup-micromamba@v1 + with: + cache-environment: true + environment-file: environment.yml + + - name: Development install + run: pip install -e . + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: Copy Custom DenseOffsets XML config + continue-on-error: true + run: + wget https://raw.githubusercontent.com/relativeorbit/workflows/main/dense.xml + + - name: Run Hyp3-ISCE2 + env: + EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }} + EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD}} + ESA_USERNAME: ${{ secrets.ESA_USERNAME }} + ESA_PASSWORD: ${{ secrets.ESA_PASSWORD}} + run: | + python -m hyp3_isce2 ++process insar_tops_fufiters \ + ${{ inputs.reference }} \ + ${{ inputs.secondary }} \ + --burstId ${{ inputs.burstId }} \ + --polarization ${{ inputs.polarization }} \ + --looks ${{ inputs.looks }} \ + --apply-water-mask False + + - name: Get Dates for Output Subfolder Name + env: + REF: ${{ inputs.reference }} + SEC: ${{ inputs.secondary }} + run: | + PREFIX=${REF:17:8}_${SEC:17:8} + echo "PREFIX=${PREFIX}" >> $GITHUB_ENV + + - name: Upload to AWS S3 + env: + BURSTID: ${{ inputs.burstId }} + run: | + OUTDIR=`ls -d S1_*` + aws s3 sync $OUTDIR s3://fufiters/testing/offsets/$BURSTID/$PREFIX/$OUTDIR + + - name: Upload to GitHub Artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.PREFIX }} + path: S1_*INT* diff --git a/.gitignore b/.gitignore index a93118a..b78c63e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store .vscode # Byte-compiled / optimized / DLL files