Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drexec
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
rds
2dfdr
drexec
Commits
e307c379
Commit
e307c379
authored
6 years ago
by
mnb
Committed by
afarrell
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added aaorun command SKYSUB_PCA
Added aaorun command "SKYSUB_PCA"
parent
72aa5ab4
No related branches found
Branches containing commit
Tags
3.712
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.c
+38
-0
38 additions, 0 deletions
main.c
skysub_pca.F95
+57
-0
57 additions, 0 deletions
skysub_pca.F95
with
95 additions
and
0 deletions
main.c
+
38
−
0
View file @
e307c379
...
@@ -32,6 +32,7 @@ extern void reduce_gen(DitsArgType*,StatusType*);
...
@@ -32,6 +32,7 @@ extern void reduce_gen(DitsArgType*,StatusType*);
extern
void
make_im___
(
DitsArgType
*
,
StatusType
*
);
extern
void
make_im___
(
DitsArgType
*
,
StatusType
*
);
extern
void
make_ex_
(
DitsArgType
*
,
StatusType
*
);
extern
void
make_ex_
(
DitsArgType
*
,
StatusType
*
);
extern
void
make_red_
(
DitsArgType
*
,
StatusType
*
);
extern
void
make_red_
(
DitsArgType
*
,
StatusType
*
);
extern
void
skysub_pca_
(
DitsArgType
*
,
StatusType
*
);
extern
void
splice_aaomega_
(
DitsArgType
*
,
StatusType
*
);
extern
void
splice_aaomega_
(
DitsArgType
*
,
StatusType
*
);
extern
void
detect_cosmic_streaks_
(
DitsArgType
*
,
StatusType
*
);
extern
void
detect_cosmic_streaks_
(
DitsArgType
*
,
StatusType
*
);
extern
void
transfer_function_correction_
(
DitsArgType
*
,
StatusType
*
);
extern
void
transfer_function_correction_
(
DitsArgType
*
,
StatusType
*
);
...
@@ -57,6 +58,7 @@ static void reduceGenAction(StatusType*);
...
@@ -57,6 +58,7 @@ static void reduceGenAction(StatusType*);
static
void
makeIMAction
(
StatusType
*
);
static
void
makeIMAction
(
StatusType
*
);
static
void
makeEXAction
(
StatusType
*
);
static
void
makeEXAction
(
StatusType
*
);
static
void
makeREDAction
(
StatusType
*
);
static
void
makeREDAction
(
StatusType
*
);
static
void
skysubPCAAction
(
StatusType
*
);
static
void
spliceAction
(
StatusType
*
);
static
void
spliceAction
(
StatusType
*
);
static
void
transfuncAction
(
StatusType
*
);
static
void
transfuncAction
(
StatusType
*
);
static
void
detectCosmicStreaksAction
(
StatusType
*
);
static
void
detectCosmicStreaksAction
(
StatusType
*
);
...
@@ -106,6 +108,7 @@ int main(int argc,char** argv)
...
@@ -106,6 +108,7 @@ int main(int argc,char** argv)
{
makeIMAction
,
plotKick
,
0
,
0
,
0
,
0
,
"MAKE_IM"
},
{
makeIMAction
,
plotKick
,
0
,
0
,
0
,
0
,
"MAKE_IM"
},
{
makeEXAction
,
plotKick
,
0
,
0
,
0
,
0
,
"MAKE_EX"
},
{
makeEXAction
,
plotKick
,
0
,
0
,
0
,
0
,
"MAKE_EX"
},
{
makeREDAction
,
plotKick
,
0
,
0
,
0
,
0
,
"MAKE_RED"
},
{
makeREDAction
,
plotKick
,
0
,
0
,
0
,
0
,
"MAKE_RED"
},
{
skysubPCAAction
,
plotKick
,
0
,
0
,
0
,
0
,
"SKYSUB_PCA"
},
{
spliceAction
,
plotKick
,
0
,
0
,
0
,
0
,
"SPLICE"
},
{
spliceAction
,
plotKick
,
0
,
0
,
0
,
0
,
"SPLICE"
},
{
transfuncAction
,
plotKick
,
0
,
0
,
0
,
0
,
"TRANSFUNC"
},
{
transfuncAction
,
plotKick
,
0
,
0
,
0
,
0
,
"TRANSFUNC"
},
{
detectCosmicStreaksAction
,
plotKick
,
0
,
0
,
0
,
0
,
"DETECT_CSTRKS"
},
{
detectCosmicStreaksAction
,
plotKick
,
0
,
0
,
0
,
0
,
"DETECT_CSTRKS"
},
...
@@ -792,6 +795,41 @@ void makeREDAction(
...
@@ -792,6 +795,41 @@ void makeREDAction(
DitsPutRequest
(
DITS_REQ_END
,
pStatus
);
DitsPutRequest
(
DITS_REQ_END
,
pStatus
);
}
}
/*---------------------------------------------------------------------------*/
void
skysubPCAAction
(
StatusType
*
pStatus
)
/*
* Handler for "make_IM" DRAMA action.
*/
{
DitsArgType
args
;
SdsIdType
localArgs
=
0
;
StatusType
ignore
=
STATUS__OK
;
if
(
*
pStatus
!=
DITS__OK
)
return
;
/* get our SDS argument structure */
args
=
DitsGetArgument
();
/* for debug print our argument structure on stdout*/
SdsList
(
args
,
pStatus
);
/* make copy so it can be changed (external SDS -> internal) */
SdsCopy
(
args
,
&
localArgs
,
pStatus
);
/* call Fortran make_red() */
skysub_pca_
(
&
localArgs
,
pStatus
);
if
(
*
pStatus
!=
DITS__OK
)
{
ErsRep
(
0
,
pStatus
,
"%s"
,
"PCA Sky Subtraction error"
);
}
/* delete local SDS copy and free its id*/
SdsDelete
(
localArgs
,
&
ignore
);
SdsFreeId
(
localArgs
,
&
ignore
);
DitsPutRequest
(
DITS_REQ_END
,
pStatus
);
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
...
...
This diff is collapsed.
Click to expand it.
skysub_pca.F95
+
57
−
0
View file @
e307c379
! Copyright (c) Anglo-Australian Telescope Board, 1999.
! Copyright (c) Anglo-Australian Telescope Board, 1999.
! Not to be used for commercial purposes without AATB permission.
! Not to be used for commercial purposes without AATB permission.
SUBROUTINE
SKYSUB_PCA
(
ARGS
,
STATUS
)
! --------
! Purpose:
! --------
! Command called from main.c as an aaorun execution
!
! aaorun skysub_pca [filename] [arg1] [arg2] etc.
!
! Where filename is stored in the ARGS SDS stucture as "OBJECT_FILENAME"
! ------------
! Description:
! ------------
! Determines from the supplied arguments what is the object
! file in question. Open specified object file for udate
! then call SKYSUBPCA to process it and finally close.
!
IMPLICIT
NONE
INCLUDE
'TDFRED_PAR'
INCLUDE
'tdfio.inc'
! Arguments:
INTEGER
,
INTENT
(
IN
)
::
ARGS
! SDS identifier of structure containing
! method arguments, see MAKE_EX_FROM_IM
INTEGER
,
INTENT
(
INOUT
)::
STATUS
! Global status
! Local variables:
CHARACTER
(
LEN
=
MAXNAMELEN_FILE
)
::
OBJECT_FILENAME
INTEGER
::
OBJECT
print
*
,
''
print
*
,
' =================='
print
*
,
' SKY SUB PCA CALLED'
print
*
,
' =================='
print
*
,
''
CALL
ARG_GET0C
(
ARGS
,
'OBJECT_FILENAME'
,
OBJECT_FILENAME
,
STATUS
)
PRINT
*
,
'OBJ FILE='
//
TRIM
(
OBJECT_FILENAME
)
! Open the object frame for update
CALL
TDFIO_OPEN
(
OBJECT
,
OBJECT_FILENAME
,
'UPDATE'
,
TDFIO_STD_TYPE
,
STATUS
)
! Call PCA sky subtraction
CALL
SKYSUBPCA
(
OBJECT
,
ARGS
,
STATUS
)
! Close object frame
CALL
TDFIO_CLOSE
(
OBJECT
,
STATUS
)
END
SUBROUTINE
SKYSUB_PCA
! ----------------------------------------------------------------------
! ----------------------------------------------------------------------
SUBROUTINE
SKYSUBPCA
(
OBJECT
,
ARGS
,
STATUS
)
SUBROUTINE
SKYSUBPCA
(
OBJECT
,
ARGS
,
STATUS
)
!+
!+
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment