Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Merge requests
!314
standard cms imaging templates v1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
standard cms imaging templates v1
Standard_CMS_Imaging
into
main
Overview
0
Commits
3
Pipelines
2
Changes
1
Merged
Charlotte Hausman
requested to merge
Standard_CMS_Imaging
into
main
3 years ago
Overview
0
Commits
3
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Compare
main
version 1
04a46941
3 years ago
main (base)
and
latest version
latest version
391d7bcb
3 commits,
3 years ago
version 1
04a46941
2 commits,
3 years ago
1 file
+
195
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
schema/versions/a832fcb74a8c_add_std_cms_imaging_templates.py
0 → 100644
+
195
−
0
Options
"""
add std_cms_imaging templates
Revision ID: a832fcb74a8c
Revises: 6ce7b4b8a9ea
Create Date: 2021-06-28 15:51:12.733523
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
"
a832fcb74a8c
"
down_revision
=
"
6ce7b4b8a9ea
"
branch_labels
=
None
depends_on
=
None
condor_content
=
"""
executable = std_cms_imaging.sh
arguments = metadata.json PPR.xml
output = imaging.out
error = imaging.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
CMS_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/spool/{{relative_path}}/working
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/.matplotlib, $(SBIN_PATH)/pycapo, $(SBIN_PATH)/framework.sh, $(SBIN_PATH)/productfetcher,
$(SBIN_PATH)/casa_envoy, $(SBIN_PATH)/vela, $(SBIN_PATH)/conveyor, ./PPR.xml, ./metadata.json, $(CMS_PATH)/{{cms_name}}
request_memory = {{ramInGb}}
getenv = True
environment =
"
CAPO_PATH=/home/casa/capo
"
queue
"""
script_content
=
"""
#!/bin/sh
export HOME=$TMPDIR
./framework.sh -d .
chmod 770 .
mv {{cms_name}} ./rawdata
./casa_envoy --standard-cmsimage $1 $2
./conveyor --deliver-image $1
"""
metadata_content
=
"""
{
"
fileSetIds
"
:
"
{{sdmId}}
"
,
"
workflowName
"
:
"
std_cms_imaging
"
,
"
systemId
"
:
"
{{request_id}}
"
,
"
productLocator
"
:
"
{{product_locator}}
"
,
"
projectMetadata
"
: {
"
projectCode
"
:
"
{{projectCode}}
"
,
"
title
"
:
"
{{title}}
"
,
"
startTime
"
:
"
{{startTime}}
"
,
"
observer
"
:
"
{{observer}}
"
},
"
destinationDirectory
"
:
"
{{root_directory}}/{{relative_path}}
"
"
calibrationSourceDirectory
"
:
"
{{cal_directory}}
"
}
"""
ppr_content
=
"""
<?xml version=
"
1.0
"
encoding=
"
UTF-8
"
standalone=
"
yes
"
?>
<ns2:SciPipeRequest xmlns:ns2=
"
Common/pipelinescience/SciPipeRequest
"
>
<ProjectSummary>
<ProposalCode>VLA/null</ProposalCode>
<Observatory>NRAO</Observatory>
<Telescope>VLA</Telescope>
<ProcessingSite>Socorro</ProcessingSite>
<Operator>vlapipe</Operator>
<Mode>SCIENCE</Mode>
<Version>NGRH-ALMA-10_8</Version>
<CreationTime>{{created_at}}</CreationTime>
</ProjectSummary>
<ProjectStructure>TBD</ProjectStructure>
<ProcessingRequests>
<RootDirectory>{{root_directory}}</RootDirectory>
<ProcessingRequest>
<ProcessingIntents>
<Intents>
<Keyword>VLA_INTERFEROMETRY_STANDARD_OBSERVING_MODE</Keyword>
<Value>Undefined</Value>
</Intents>
</ProcessingIntents>
<ProcessingProcedure>
<ProcedureTitle>hifv_contimage</ProcedureTitle>
<ProcessingCommand>
<Command xmlns=
""
>hifv_importdata</Command>
<ParameterSet>
</ParameterSet>
</ProcessingCommand>
<ProcessingCommand>
<Command xmlns=
""
>hif_mstransform</Command>
<ParameterSet>
</ParameterSet>
</ProcessingCommand>
<ProcessingCommand>
<Command xmlns=
""
>hif_checkproductsize</Command>
<ParameterSet>
<Parameter>
<Keyword xmlns=
""
>maximsize</Keyword>
<Value xmlns=
""
>16384</Value>
</Parameter>
</ParameterSet>
</ProcessingCommand>
<ProcessingCommand>
<Command xmlns=
""
>hif_makeimlist</Command>
<ParameterSet>
<Parameter>
<Keyword xmlns=
""
>specmode</Keyword>
<Value xmlns=
""
>cont</Value>
</Parameter>
</ParameterSet>
</ProcessingCommand>
<ProcessingCommand>
<Command xmlns=
""
>hif_makeimages</Command>
<ParameterSet>
<Parameter>
<Keyword xmlns=
""
>hm_masking</Keyword>
<Value xmlns=
""
>none</Value>
</Parameter>
<Parameter>
<Keyword xmlns=
""
>hm_cyclefactor</Keyword>
<Value xmlns=
""
>3.0</Value>
</Parameter>
</ParameterSet>
</ProcessingCommand>
<ProcessingCommand>
<Command xmlns=
""
>hifv_exportdata</Command>
<ParameterSet>
<Parameter>
<Keyword xmlns=
""
>imaging_products_only</Keyword>
<Value xmlns=
""
>True</Value>
</Parameter>
</ParameterSet>
</ProcessingCommand>
</ProcessingProcedure>
<DataSet>
<RelativePath>{{relative_path}}</RelativePath>
<SdmIdentifier>{{sdmId}}.ms</SdmIdentifier>
<DataType>asdm</DataType>
</DataSet>
</ProcessingRequest>0
</ProcessingRequests>
<ResultsProcessing>
<ArchiveResults>false</ArchiveResults>
<CleanUpDisk>false</CleanUpDisk>
<UpdateProjectLifeCycle>false</UpdateProjectLifeCycle>
<NotifyOperatorWhenDone>false</NotifyOperatorWhenDone>
<SDMall>false</SDMall>
<SDMonly>false</SDMonly>
<PipelineOperatorAddress>Unknown</PipelineOperatorAddress>
</ResultsProcessing>
</ns2:SciPipeRequest>
"""
def
upgrade
():
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES(
'
std_cms_imaging.condor
'
, E
'
{
condor_content
}
'
,
'
std_cms_imaging
'
)
"""
)
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES (
'
std_cms_imaging.sh
'
, E
'
{
script_content
}
'
,
'
std_cms_imaging
'
)
"""
)
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES (
'
metadata.json
'
, E
'
{
metadata_content
}
'
,
'
std_cms_imaging
'
)
"""
)
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES (
'
PPR.xml
'
, E
'
{
ppr_content
}
'
,
'
std_cms_imaging
'
)
"""
)
def
downgrade
():
op
.
execute
(
"""
DELETE FROM workflow_templates WHERE workflow_name=
'
std_cms_imaging
'
"""
)
Loading