Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPC_Imaging
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Claudio Gheller
HPC_Imaging
Commits
733cebcf
Commit
733cebcf
authored
Dec 28, 2022
by
Claudio Gheller
Browse files
Options
Downloads
Patches
Plain Diff
few bug fixed
parent
b854572e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
inverse-imaging.c
+17
-9
17 additions, 9 deletions
inverse-imaging.c
with
17 additions
and
9 deletions
inverse-imaging.c
+
17
−
9
View file @
733cebcf
...
...
@@ -84,7 +84,7 @@ int main(int argc, char * argv[])
// Image related files
char
imagepath
[
900
]
=
"./"
;
#ifdef FITSIO
char
imagename
[
FILENAMELENGTH
]
=
"
image_name
.fits"
;
char
imagename
[
FILENAMELENGTH
]
=
"
test
.fits"
;
#else
char
imagename
[
FILENAMELENGTH
]
=
"image_name.bin"
;
#endif
...
...
@@ -113,8 +113,8 @@ int main(int argc, char * argv[])
double
resolution
;
// Mesh related parameters: global size
int
grid_size_x
=
2048
;
int
grid_size_y
=
2048
;
int
grid_size_x
=
1024
;
int
grid_size_y
=
1024
;
// Split Mesh size (auto-calculated)
int
local_grid_size_x
;
int
local_grid_size_y
;
...
...
@@ -215,7 +215,7 @@ if(rank == 0){
// INPUT FILES (only the first ndatasets entries are used)
int
ndatasets
=
1
;
strcpy
(
datapath_multi
[
0
],
"/m100_scratch/userexternal/cgheller/
gridding/Lofar
/L798046_SB244_uv.uncorr_130B27932t_146MHz.pre-cal.binMS/"
);
strcpy
(
datapath_multi
[
0
],
"/m100_scratch/userexternal/cgheller/
inverse_imaging
/L798046_SB244_uv.uncorr_130B27932t_146MHz.pre-cal.binMS/"
);
strcpy
(
datapath
,
datapath_multi
[
0
]);
// Read metadata
...
...
@@ -363,8 +363,10 @@ if(rank == 0){
int
naxis
;
long
*
naxes
;
fits_get_img_dim
(
fptr
,
&
naxis
,
&
status
);
printf
(
"number of axis: %d
\n
"
,
naxis
);
naxes
=
(
long
*
)
malloc
(
sizeof
(
long
)
*
naxis
);
fits_get_img_size
(
fptr
,
naxis
,
naxes
,
&
status
);
printf
(
"image size (from FITS file): %d
\n
"
,
naxes
[
0
]);
if
(
naxes
[
0
]
!=
xaxis
){
printf
(
"Wrong Image Size : %d vs %d
\n
"
,
naxes
[
0
],
xaxis
);
exit
(
2
);
...
...
@@ -378,11 +380,11 @@ if(rank == 0){
fpixel
[
0
]
=
1
;
lpixel
[
0
]
=
xaxis
;
inc
[
0
]
=
1
;
fpixel
[
1
]
=
1
;
lpixel
[
1
]
=
rank
*
yaxis
+
1
;
fpixel
[
1
]
=
rank
*
yaxis
+
1
;
lpixel
[
1
]
=
(
rank
+
1
)
*
yaxis
+
1
;
inc
[
1
]
=
1
;
fits_read_
subset
(
fptr
,
T
FLOAT
,
fpixel
,
lpixel
,
inc
,
NULL
,
image_real
,
&
anynul
,
&
status
);
fits_read_subset
(
fptr
,
TDOUBLE
,
fpixel
,
lpixel
,
inc
,
NULL
,
image_real
,
&
anynul
,
&
status
);
//
fits_read_
img
(fptr, T
DOUBLE, 1, xaxis*yaxis
, NULL, image_real, &anynul, &status);
fits_close_file
(
fptr
,
&
status
);
#else
...
...
@@ -394,7 +396,12 @@ if(rank == 0){
fclose
(
pFilereal
);
#endif
// image read
// We read binary images, however we can easily extend to fits files
#ifdef WRITE_DATA
pFilereal
=
fopen
(
"revtest.bin"
,
"wb"
);
fwrite
(
image_real
,
xaxis
*
yaxis
,
sizeof
(
double
),
pFilereal
);
fclose
(
pFilereal
);
#endif
if
(
rank
==
0
)
printf
(
"FFT TRANSFORMING (from Real to Complex Fourier space)
\n
"
);
...
...
@@ -521,6 +528,7 @@ if(rank == 0){
#endif
#endif //WRITE_DATA
exit
(
3
);
if
(
rank
==
0
)
printf
(
"CREATING LINKED LISTS
\n
"
);
...
...
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