Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96642706
im_bin.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Dec 29, 09:57
Size
668 B
Mime Type
text/x-c
Expires
Tue, Dec 31, 09:57 (2 d)
Engine
blob
Format
Raw Data
Handle
23218491
Attached To
R1448 Lenstool-HPC
im_bin.c
View Options
#include<stdio.h>
#include<math.h>
#include "fonction.h"
#include "constant.h"
#include"dimension.h"
#include "structure.h"
#include "lt.h"
long
int
im_bin
(
double
**
im
,
int
nx
,
int
ny
,
int
bin
)
{
register
int
i
,
j
,
ii
,
jj
;
double
s
,
B
;
double
**
imbin
;
B
=
bin
;
imbin
=
(
double
**
)
alloc_square_double
(
nx
/
bin
,
ny
/
bin
);
for
(
i
=
0
;
i
<
nx
;
i
+=
bin
)
for
(
j
=
0
;
j
<
ny
;
j
+=
bin
)
{
s
=
0.
;
for
(
ii
=
0
;
ii
<
bin
;
ii
++
)
for
(
jj
=
0
;
jj
<
bin
;
jj
++
)
s
+=
im
[
i
+
ii
][
j
+
jj
];
imbin
[
i
/
bin
][
j
/
bin
]
=
s
/
B
/
B
;
};
return
((
long
int
)
imbin
);
}
Event Timeline
Log In to Comment