Computing desk | ||
---|---|---|
< September 12 | << Aug | September | Oct >> | September 14 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Don't know what is the right terminology in English to use in Google so I ask here:
In folders with much images, I can't navigate with right and left arrows between images --- If I do, it navigated randomly and not logically as I had with windows 7. This problem damages my work, please help, — Preceding unsigned comment added by Ben-Yeudith ( talk • contribs) 02:01, 13 September 2015 (UTC)
the companies don´t need to publish and press any blu-ray and print a booklet and a dvd cover and it is not necessary to hold and keep them in any store or hall waiting for real customers... but the psn games in the PSN store are every time more expensive. -- Motorolakzrz ( talk) 03:16, 13 September 2015 (UTC)
To your star wars problem I would guess that George Lucas is the reason. He isn´t allowing amazon to sell the streams less than your 89,99. On the DVD layers he has no rights any more, amazon could resell them for 1 cent if they want without having problems, but selling the stream for 1 cent would make Lucas angry...-- Motorolakzrz ( talk) 07:27, 13 September 2015 (UTC)
I need to do a 2-D Fourier Transform on a unit sphere. It has two components, the first one is a standard Fourier Transform. The input 2-D image (function) is experimental, therefore I need to use Discrete Fourier Transform. There are many published algorithms for Fast Discrete Fourier Transform (FFT) and even C and Fortran codes. I tested several and found them performing admirably. When I use the Inverse Transform I restore the original image (function) on all parallels (theta angles). It is not where my problem lies.
When I add the second component (Orthogonal Polynomials) something happens and I cannot restore the original 2-D function. So, I decided to try not FFT but direct DFT coded from a formula. I got a very strange result. The formulas for DFT are:
Forward Transform:
(1) |
Inverse Transform:
(2) |
To demonstrate the problem I am going to use Wikipedia's Blackman-Harris Window. The Fortran code for the function is:
REAL*8 function blackmanHarrisWindow (k, N) REAL*8 :: PI integer*4 :: k,N,N1 PI = 3.1415926535897932384626433832795 N1 = N-1HERE blackmanHarrisWindow = 0.35875-0.48829*cos(2.0*PI*k/N1)+0.14128*cos(4.0* & PI*k/N1)+0.01168*cos(6.0*PI*k/N1) end function
I however found that the graphic generated by this code, posted on MediaFire, BlackMan-Harris-Original.png file ( HERE) (In Camera folder) is more reminiscent of the next listed Flat Top Window.
GFortran code to handle the transform is here:
program main use librow_fft_mod DOUBLE COMPLEX, DIMENSION (:), POINTER :: Input, Output REAL*8 :: xx, blackmanHarrisWindow integer :: NN = 1024, jj=1, sv, ii ALLOCATE (Input(NN),Output(NN)) do while (jj < NN) xx = blackmanHarrisWindow (jj,NN) Input(jj) = CMPLX (xx,0.0D0) jj = jj + 1 enddo call fourierStraight (NN,Input,Output) Input(:) = CMPLX(0.0D0,0.0D0) call fourierBack (NN,Output,input) end program main
librow_fft_mod is an interface file for dummy arrays Input and Output.
The code for Forward and Inverse DFT follows:
subroutine fourierStraight (NN,Input,Output) ! a subroutine to calculate Fourier Transform without invoking the algorithm of FFT ! http://www.robots.ox.ac.uk/~sjrob/Teaching/SP/l7.pdf pg 85 integer*4, intent (in) :: NN DOUBLE COMPLEX, DIMENSION (:), Intent (IN), POINTER :: Input DOUBLE COMPLEX, DIMENSION (:), Intent (OUT), POINTER :: Output integer*4 :: kk,ll DOUBLE COMPLEX :: res real*8 :: pi2 = 6.28318530718 Output(:) = DCMPLX (0.0D0,0.0D0) do ll = 0,NN-1 res = DCMPLX (0.0D0,0.0D0) do kk = 0,ll res = res + real (Input(kk+1)) * DCMPLX (DCOS (kk * pi2/NN), - DSIN (kk * pi2/NN)) enddo Output(ll+1) = res enddo end subroutine fourierStraight
subroutine fourierBack (NN,Input,Output) ! http://www.robots.ox.ac.uk/~sjrob/Teaching/SP/l7.pdf pg 86 ! not FFT - straight calculations. integer*4, intent (in) :: NN DOUBLE COMPLEX, DIMENSION (:), Intent (IN), POINTER :: Input DOUBLE COMPLEX, DIMENSION (:), Intent (OUT), POINTER :: Output integer*4 :: kk,ll DOUBLE COMPLEX :: res real*8 :: pi2 = 6.28318530718 Output(:) = DCMPLX (0.0D0,0.0D0) do ll = 0,NN-1 res = DCMPLX (0.0D0,0.0D0) do kk = 0,ll res = res + Input(kk+1) * DCMPLX (DCOS (kk * pi2/NN), DSIN (kk * pi2/NN)) enddo Output(ll+1) = res/NN enddo end subroutine fourierBack
You can see that the restored function differs from the original. It is again HERE, Blackman-Harris-Restoration.png. (In Camera folder)
If you compare the code for both functions with the original formulas you can see that I dropped one multiplier, the factor n which in the code is represented by integer (Fortran is case insensitive and it necessitated the substitution). If you include this factor in the formula the restored function appears to be very bizarre. The image is HERE (File3.png In Camera folder)
The code for the changed function looks like this (for Forward Transfer):
do kk = 0,ll res = res + real (Input(kk+1)) * DCMPLX (DCOS (ll*kk * pi2/NN), - DSIN (ll*kk * pi2/NN)) enddo
Similarly for the Inverse transfer the multiplier is added.
WHAT AM I DOING WRONG?
I am posting here because I know StuRat, for instance, does GFortran coding and he gave me the original push 2 or 3 year ago when I started using it. So, I hope to find some help here. All calculations are done under Ubuntu 14.04 operating system. Thanks. -- AboutFace 22 ( talk) 21:21, 13 September 2015 (UTC)
You are correct. The precision is lost, I mean real*8 gets its 14 digits I think, that's it, but this is plenty for the computations at hand. Even single precision would be sufficient. -- AboutFace 22 ( talk) 23:00, 13 September 2015 (UTC)
Well, the code is elementary. I hoped that someone would take a fresh look, yourself including. Not much of debugging is needed here, I think. — Preceding unsigned comment added by AboutFace 22 ( talk • contribs) 00:05, 14 September 2015 (UTC)
@Abecedare, thank you for the comment. I did not realize the files I uploaded are not really accessible by anyone else. Kind of a bummer. I will be able to think about what you said in about 6 hours, now at work. It seems you are correct. I've felt it was something really silly I missed. -- AboutFace 22 ( talk) 16:42, 14 September 2015 (UTC)
@Abecedare, thank you much. Now it works perfectly well. I wonder how I missed it. -- AboutFace 22 ( talk) 00:32, 15 September 2015 (UTC)
I am trying to grep the output of avprobe, but something like
avprobe file.mp4 | grep <keyword>
is not working. I know that I could do
avprobe file.mp4 &>> file.txt && grep <keyword> file.txt
but I wonder whether this can be simplified. I also want to know why the firs option does not work.-- Scicurious ( talk) 21:52, 13 September 2015 (UTC)
avprobe file.mp4 2>&1 | grep keyword
I have a PC, a Hewlett Packard laptop ENVY series computer. It came with a 930 gigabyte hard drive and 8 gigs of ram. When I got it at about the end of 2012, it came with Windows 8. I went through a number of upgrades and I had about 100 gigabytes in use then, that is, about 830 gigabytes free. I recently upgraded to Windows 10, which is where my problems started. After I upgraded, which took about 45 minutes, it seemed successfully and at that point the computer had 715 gigs free; the computer seemed to be working with windows 10 okay. I let the computer go to sleep, and didn't come back to it for about 3 days. When I "woke" it, I saw that my disk drive said it was almost entirely full – there was a warning in the screen that said "Let's click on storage to see what is taking up so much space". I checked and the entire hard drive was full, except for a few megabytes (I think it was about 5). I have restarted multiple times, no difference. It seems impossible for Windows 10 to actually be taking up this much space. Any ideas what might be going on?-- 108.54.167.196 ( talk) 23:19, 13 September 2015 (UTC)
Computing desk | ||
---|---|---|
< September 12 | << Aug | September | Oct >> | September 14 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Don't know what is the right terminology in English to use in Google so I ask here:
In folders with much images, I can't navigate with right and left arrows between images --- If I do, it navigated randomly and not logically as I had with windows 7. This problem damages my work, please help, — Preceding unsigned comment added by Ben-Yeudith ( talk • contribs) 02:01, 13 September 2015 (UTC)
the companies don´t need to publish and press any blu-ray and print a booklet and a dvd cover and it is not necessary to hold and keep them in any store or hall waiting for real customers... but the psn games in the PSN store are every time more expensive. -- Motorolakzrz ( talk) 03:16, 13 September 2015 (UTC)
To your star wars problem I would guess that George Lucas is the reason. He isn´t allowing amazon to sell the streams less than your 89,99. On the DVD layers he has no rights any more, amazon could resell them for 1 cent if they want without having problems, but selling the stream for 1 cent would make Lucas angry...-- Motorolakzrz ( talk) 07:27, 13 September 2015 (UTC)
I need to do a 2-D Fourier Transform on a unit sphere. It has two components, the first one is a standard Fourier Transform. The input 2-D image (function) is experimental, therefore I need to use Discrete Fourier Transform. There are many published algorithms for Fast Discrete Fourier Transform (FFT) and even C and Fortran codes. I tested several and found them performing admirably. When I use the Inverse Transform I restore the original image (function) on all parallels (theta angles). It is not where my problem lies.
When I add the second component (Orthogonal Polynomials) something happens and I cannot restore the original 2-D function. So, I decided to try not FFT but direct DFT coded from a formula. I got a very strange result. The formulas for DFT are:
Forward Transform:
(1) |
Inverse Transform:
(2) |
To demonstrate the problem I am going to use Wikipedia's Blackman-Harris Window. The Fortran code for the function is:
REAL*8 function blackmanHarrisWindow (k, N) REAL*8 :: PI integer*4 :: k,N,N1 PI = 3.1415926535897932384626433832795 N1 = N-1HERE blackmanHarrisWindow = 0.35875-0.48829*cos(2.0*PI*k/N1)+0.14128*cos(4.0* & PI*k/N1)+0.01168*cos(6.0*PI*k/N1) end function
I however found that the graphic generated by this code, posted on MediaFire, BlackMan-Harris-Original.png file ( HERE) (In Camera folder) is more reminiscent of the next listed Flat Top Window.
GFortran code to handle the transform is here:
program main use librow_fft_mod DOUBLE COMPLEX, DIMENSION (:), POINTER :: Input, Output REAL*8 :: xx, blackmanHarrisWindow integer :: NN = 1024, jj=1, sv, ii ALLOCATE (Input(NN),Output(NN)) do while (jj < NN) xx = blackmanHarrisWindow (jj,NN) Input(jj) = CMPLX (xx,0.0D0) jj = jj + 1 enddo call fourierStraight (NN,Input,Output) Input(:) = CMPLX(0.0D0,0.0D0) call fourierBack (NN,Output,input) end program main
librow_fft_mod is an interface file for dummy arrays Input and Output.
The code for Forward and Inverse DFT follows:
subroutine fourierStraight (NN,Input,Output) ! a subroutine to calculate Fourier Transform without invoking the algorithm of FFT ! http://www.robots.ox.ac.uk/~sjrob/Teaching/SP/l7.pdf pg 85 integer*4, intent (in) :: NN DOUBLE COMPLEX, DIMENSION (:), Intent (IN), POINTER :: Input DOUBLE COMPLEX, DIMENSION (:), Intent (OUT), POINTER :: Output integer*4 :: kk,ll DOUBLE COMPLEX :: res real*8 :: pi2 = 6.28318530718 Output(:) = DCMPLX (0.0D0,0.0D0) do ll = 0,NN-1 res = DCMPLX (0.0D0,0.0D0) do kk = 0,ll res = res + real (Input(kk+1)) * DCMPLX (DCOS (kk * pi2/NN), - DSIN (kk * pi2/NN)) enddo Output(ll+1) = res enddo end subroutine fourierStraight
subroutine fourierBack (NN,Input,Output) ! http://www.robots.ox.ac.uk/~sjrob/Teaching/SP/l7.pdf pg 86 ! not FFT - straight calculations. integer*4, intent (in) :: NN DOUBLE COMPLEX, DIMENSION (:), Intent (IN), POINTER :: Input DOUBLE COMPLEX, DIMENSION (:), Intent (OUT), POINTER :: Output integer*4 :: kk,ll DOUBLE COMPLEX :: res real*8 :: pi2 = 6.28318530718 Output(:) = DCMPLX (0.0D0,0.0D0) do ll = 0,NN-1 res = DCMPLX (0.0D0,0.0D0) do kk = 0,ll res = res + Input(kk+1) * DCMPLX (DCOS (kk * pi2/NN), DSIN (kk * pi2/NN)) enddo Output(ll+1) = res/NN enddo end subroutine fourierBack
You can see that the restored function differs from the original. It is again HERE, Blackman-Harris-Restoration.png. (In Camera folder)
If you compare the code for both functions with the original formulas you can see that I dropped one multiplier, the factor n which in the code is represented by integer (Fortran is case insensitive and it necessitated the substitution). If you include this factor in the formula the restored function appears to be very bizarre. The image is HERE (File3.png In Camera folder)
The code for the changed function looks like this (for Forward Transfer):
do kk = 0,ll res = res + real (Input(kk+1)) * DCMPLX (DCOS (ll*kk * pi2/NN), - DSIN (ll*kk * pi2/NN)) enddo
Similarly for the Inverse transfer the multiplier is added.
WHAT AM I DOING WRONG?
I am posting here because I know StuRat, for instance, does GFortran coding and he gave me the original push 2 or 3 year ago when I started using it. So, I hope to find some help here. All calculations are done under Ubuntu 14.04 operating system. Thanks. -- AboutFace 22 ( talk) 21:21, 13 September 2015 (UTC)
You are correct. The precision is lost, I mean real*8 gets its 14 digits I think, that's it, but this is plenty for the computations at hand. Even single precision would be sufficient. -- AboutFace 22 ( talk) 23:00, 13 September 2015 (UTC)
Well, the code is elementary. I hoped that someone would take a fresh look, yourself including. Not much of debugging is needed here, I think. — Preceding unsigned comment added by AboutFace 22 ( talk • contribs) 00:05, 14 September 2015 (UTC)
@Abecedare, thank you for the comment. I did not realize the files I uploaded are not really accessible by anyone else. Kind of a bummer. I will be able to think about what you said in about 6 hours, now at work. It seems you are correct. I've felt it was something really silly I missed. -- AboutFace 22 ( talk) 16:42, 14 September 2015 (UTC)
@Abecedare, thank you much. Now it works perfectly well. I wonder how I missed it. -- AboutFace 22 ( talk) 00:32, 15 September 2015 (UTC)
I am trying to grep the output of avprobe, but something like
avprobe file.mp4 | grep <keyword>
is not working. I know that I could do
avprobe file.mp4 &>> file.txt && grep <keyword> file.txt
but I wonder whether this can be simplified. I also want to know why the firs option does not work.-- Scicurious ( talk) 21:52, 13 September 2015 (UTC)
avprobe file.mp4 2>&1 | grep keyword
I have a PC, a Hewlett Packard laptop ENVY series computer. It came with a 930 gigabyte hard drive and 8 gigs of ram. When I got it at about the end of 2012, it came with Windows 8. I went through a number of upgrades and I had about 100 gigabytes in use then, that is, about 830 gigabytes free. I recently upgraded to Windows 10, which is where my problems started. After I upgraded, which took about 45 minutes, it seemed successfully and at that point the computer had 715 gigs free; the computer seemed to be working with windows 10 okay. I let the computer go to sleep, and didn't come back to it for about 3 days. When I "woke" it, I saw that my disk drive said it was almost entirely full – there was a warning in the screen that said "Let's click on storage to see what is taking up so much space". I checked and the entire hard drive was full, except for a few megabytes (I think it was about 5). I have restarted multiple times, no difference. It seems impossible for Windows 10 to actually be taking up this much space. Any ideas what might be going on?-- 108.54.167.196 ( talk) 23:19, 13 September 2015 (UTC)