Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TRACY3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Optics
TRACY3
Commits
c4905bb7
Commit
c4905bb7
authored
13 years ago
by
zhang
Browse files
Options
Downloads
Patches
Plain Diff
Separate misalignment error and COD correction.
parent
fc6c25a2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tracy/tracy/inc/lsoc.h
+9
-13
9 additions, 13 deletions
tracy/tracy/inc/lsoc.h
tracy/tracy/src/lsoc.cc
+7
-7
7 additions, 7 deletions
tracy/tracy/src/lsoc.cc
with
16 additions
and
20 deletions
tracy/tracy/inc/lsoc.h
+
9
−
13
View file @
c4905bb7
...
...
@@ -10,11 +10,11 @@
extern
const
int
nCOR
;
extern
const
char
hOrbitFileName
[];
extern
const
char
vOrbitFileName
[];
extern
const
char
OrbScanFileName
[];
//
extern const char hOrbitFileName[];
//
extern const char vOrbitFileName[];
//
extern const char OrbScanFileName[];
extern
FILE
*
OrbScanFile
;
//
extern FILE *OrbScanFile;
/****** for orbit correction *********/
void
prt_gcmat
(
int
bpm
,
int
corr
,
int
plane
);
...
...
@@ -23,21 +23,17 @@ void gcmat(int bpm, int corr, int plane);
void
lsoc
(
int
niter
,
int
bpm
,
int
corr
,
int
plane
);
/***The following functions are copied from nsls-ii_lib_templ.h, need to be tested***/
bool
CorrectCOD_Ns
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
const
char
*
ae_file
,
const
int
n_orbit
,
const
int
n
,
const
int
k
,
const
int
nwh
,
const
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
);
void
readCorrectorList
(
const
char
*
hCorrListName
,
const
char
*
vCorrListName
,
int
*
hcorrIdx
,
int
*
vcorrIdx
);
/***The following functions are copied from nsls-ii_lib_templ.h, need to be tested***/
void
readCorrectorList
(
const
char
*
hCorrListName
,
const
char
*
vCorrListName
,
int
*
hcorrIdx
,
int
*
vcorrIdx
);
void
gcmats
(
int
bpm
,
int
corr
,
int
plane
,
int
*
corrIdx
);
void
LoadFieldErrs
(
const
char
*
FieldErrorFile
,
const
bool
Scale_it
,
const
double
Scale
,
const
bool
new_rnd
,
const
int
ik
);
bool
CorrectCOD_Ns
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
FILE
*
OrbitScanFile
,
const
char
*
ae_file
,
const
int
n_orbit
,
const
int
n
,
const
int
k
,
const
int
nwh
,
const
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
);
bool
CorrectCOD_Ns
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
const
char
*
ae_file
,
const
int
n_orbit
,
const
int
n
,
const
int
k
,
const
int
nwh
,
const
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
);
bool
CorrectCODs
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
int
n_orbit
,
int
nwh
,
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
);
bool
CorrectCODs
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
FILE
*
OrbScanFile
,
int
n_orbit
,
int
nwh
,
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
);
void
lsoc2
(
int
niter
,
int
bpm
,
int
corr
,
int
plane
,
int
nval
);
...
...
This diff is collapsed.
Click to expand it.
tracy/tracy/src/lsoc.cc
+
7
−
7
View file @
c4905bb7
...
...
@@ -25,11 +25,11 @@ double *w_lsoc[2], **A_lsoc[2],**U_lsoc[2], **V_lsoc[2]; //response matrix bet
//global values
/* parameters for orbit correction */
const
int
nCOR
=
250
;
// maximum number of correctors
const
char
hOrbitFileName
[]
=
"horbit.out"
;
// LSN
const
char
vOrbitFileName
[]
=
"vorbit.out"
;
//LSN
const
char
OrbScanFileName
[]
=
"OrbScanFile.out"
;
//
const char hOrbitFileName[] = "horbit.out"; // LSN
//
const char vOrbitFileName[] = "vorbit.out"; //LSN
//
const char OrbScanFileName[] = "OrbScanFile.out";
FILE
*
OrbScanFile
;
//
FILE *OrbScanFile;
...
...
@@ -225,7 +225,7 @@ bool CorrectCOD_Ns(FILE *hOrbitFile, FILE *vOrbitFile, const char *ae_file, cons
n_orbit number of iteration for orbit correction
n number of scaling
*******************************************************************************/
bool
CorrectCOD_Ns
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
const
char
*
ae_file
,
const
int
n_orbit
,
bool
CorrectCOD_Ns
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
FILE
*
OrbitScanFile
,
const
char
*
ae_file
,
const
int
n_orbit
,
const
int
n
,
const
int
k
,
const
int
nwh
,
const
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
)
{
bool
cod
=
false
;
...
...
@@ -242,7 +242,7 @@ bool CorrectCOD_Ns(FILE *hOrbitFile, FILE *vOrbitFile, const char *ae_file, cons
Align_BPM2quad
(
Quad
);
}
cod
=
CorrectCODs
(
hOrbitFile
,
vOrbitFile
,
n_orbit
,
nwh
,
nwv
,
hcorrIdx
,
vcorrIdx
);
cod
=
CorrectCODs
(
hOrbitFile
,
vOrbitFile
,
OrbitScanFile
,
n_orbit
,
nwh
,
nwv
,
hcorrIdx
,
vcorrIdx
);
return
cod
;
}
...
...
@@ -590,7 +590,7 @@ bool CorrectCODs(FILE *hOrbitFile, FILE *vOrbitFile, int n_orbit, int nwh, int n
sextupole strength, to make it work in a
general way, not lattice specific.
******************************************************************************************/
bool
CorrectCODs
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
int
n_orbit
,
int
nwh
,
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
)
bool
CorrectCODs
(
FILE
*
hOrbitFile
,
FILE
*
vOrbitFile
,
FILE
*
OrbScanFile
,
int
n_orbit
,
int
nwh
,
int
nwv
,
int
*
hcorrIdx
,
int
*
vcorrIdx
)
{
bool
cod
;
int
i
,
j
;
...
...
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