c12-5 (Numerical Recipes in C)

PDF-файл c12-5 (Numerical Recipes in C) Цифровая обработка сигналов (ЦОС) (15336): Книга - 8 семестрc12-5 (Numerical Recipes in C) - PDF (15336) - СтудИзба2017-12-27СтудИзба

Описание файла

Файл "c12-5" внутри архива находится в папке "Numerical Recipes in C". PDF-файл из архива "Numerical Recipes in C", который расположен в категории "". Всё это находится в предмете "цифровая обработка сигналов (цос)" из 8 семестр, которые можно найти в файловом архиве МГТУ им. Н.Э.Баумана. Не смотря на прямую связь этого архива с МГТУ им. Н.Э.Баумана, его также можно найти и в других разделах. Архив можно найти в разделе "книги и методические указания", в предмете "цифровая обработка сигналов" в общих файлах.

Просмотр PDF-файла онлайн

Текст из PDF

52512.5 Fourier Transforms of Real Data in Two and Three DimensionsCITED REFERENCES AND FURTHER READING:Nussbaumer, H.J. 1982, Fast Fourier Transform and Convolution Algorithms (New York: SpringerVerlag).Two-dimensional FFTs are particularly important in the field of image processing. An image is usually represented as a two-dimensional array of pixel intensities,real (and usually positive) numbers.

One commonly desires to filter high, or low,frequency spatial components from an image; or to convolve or deconvolve theimage with some instrumental point spread function. Use of the FFT is by far themost efficient technique.In three dimensions, a common use of the FFT is to solve Poisson’s equationfor a potential (e.g., electromagnetic or gravitational) on a three-dimensional latticethat represents the discretization of three-dimensional space. Here the source terms(mass or charge distribution) and the desired potentials are also real.

In two andthree dimensions, with large arrays, memory is often at a premium. It is thereforeimportant to perform the FFTs, insofar as possible, on the data “in place.” Wewant a routine with functionality similar to the multidimensional FFT routine fourn(§12.4), but which operates on real, not complex, input data. We give such aroutine in this section. The development is analogous to that of §12.3 leading tothe one-dimensional routine realft.

(You might wish to review that material atthis point, particularly equation 12.3.5.)It is convenient to think of the independent variables n1 , . . . , nL in equation(12.4.3) as representing an L-dimensional vector ~n in wave-number space, withvalues on the lattice of integers. The transform H(n1 , . . . , nL ) is then denotedH(~n).It is easy to see that the transform H(~n) is periodic in each of its L dimensions.~2, P~ 3, . .

. denote the vectors (N1 , 0, 0, . . .), (0, N2 , 0, . . .),Specifically, if P~1 , P(0, 0, N3 , . . .), and so forth, thenH(~n ± P~j ) = H(~n)j = 1, . . . , L(12.5.1)Equation (12.5.1) holds for any input data, real or complex. When the data is real,we have the additional symmetryH(−~n) = H(~n)*(12.5.2)Equations (12.5.1) and (12.5.2) imply that the full transform can be trivially obtainedfrom the subset of lattice values ~n that have0 ≤ n1 ≤ N1 − 10 ≤ n2 ≤ N2 − 1(12.5.3)···0 ≤ nL ≤NL2Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use.

Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).12.5 Fourier Transforms of Real Data in Twoand Three Dimensions526Chapter 12.Fast Fourier TransformRe(SPEC[i1][i2][i3]) = data[i1][i2][2*i3-1]Im(SPEC[i1][i2][i3]) = data[i1][i2][2*i3](12.5.4)The remaining “plane” of values, SPEC[1..nn1][1..nn2][nn3/2+1], is returnedin the two-dimensional float array speq[1..nn1][1..2*nn2],with the correspondenceRe(SPEC[i1][i2][nn3/2+1]) = speq[i1][2*i2-1]Im(SPEC[i1][i2][nn3/2+1]) = speq[i1][2*i2](12.5.5)Note that speq contains frequency components whose third component f3 is atthe Nyquist critical frequency ±fc .

In some applications these values will in factbe ignored or set to zero, since they are intrinsically aliased between positive andnegative frequencies.With this much introduction, the implementing procedure, called rlft3, issomething of an anticlimax. Look in the innermost loop in the procedure, and youwill see equation (12.3.5) implemented on the last transform index. The case ofi3=1 is coded separately, to account for the fact that speq is to be filled instead ofSample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).In fact, this set of values is overcomplete, because there are additional symmetryrelations among the transform values that have nL = 0 and nL = NL /2.

Howeverthese symmetries are complicated and their use becomes extremely confusing.Therefore, we will compute our FFT on the lattice subset of equation (12.5.3),even though this requires a small amount of extra storage for the answer, i.e., thetransform is not quite “in place.” (Although an in-place transform is in fact possible,we have found it virtually impossible to explain to any user how to unscramble itsoutput, i.e., where to find the real and imaginary components of the transform atsome particular frequency!)We will implement the multidimensional real Fourier transform for the threedimensional case L = 3, with the input data stored as a real, three-dimensional arraydata[1..nn1][1..nn2][1..nn3].

This scheme will allow two-dimensional datato be processed with effectively no loss of efficiency simply by choosing nn1 = 1.(Note that it must be the first dimension that is set to 1.) The output spectrum comesback packaged, logically at least, as a complex, three-dimensional array that we cancall SPEC[1..nn1][1..nn2][1..nn3/2+1] (cf. equation 12.5.3).

In the first twoof its three dimensions, the respective frequency values f1 or f2 are stored in wraparound order, that is with zero frequency in the first index value, the smallest positivefrequency in the second index value, the smallest negative frequency in the lastindex value, and so on (cf. the discussion leading up to routines four1 and fourn).The third of the three dimensions returns only the positive half of the frequencyspectrum. Figure 12.5.1 shows the logical storage scheme. The returned portion ofthe complex output spectrum is shown as the unshaded part of the lower figure.The physical, as opposed to logical, packaging of the output spectrum is necessarily a bit different from the logical packaging, because C does not have a convenient,portable mechanism for equivalencing real and complex arrays.

The subscript rangeSPEC[1..nn1][1..nn2][1..nn3/2] is returned in the input array data[1..nn1][1..nn2][1..nn3], with the correspondence52712.5 Fourier Transforms of Real Data in Two and Three Dimensionsnn2, 1nn2, nn3Input data arrayOutput spectrumarrays (complex)1, nn3f3 = 0f 3 = – fcf2 = fc1,1f2 = 0returned in spec[1..nn1][1..2*nn2]1,1nn2,nn3/2returned indata[1..nn1][1..nn2][1..nn3]nn2,11,nn3/2f2 = − fcFigure 12.5.1.Input and output data arrangement for rlft3. All arrays shown are presumedto have a first (leftmost) dimension of range [1..nn1], coming out of the page. The input dataarray is a real, three-dimensional array data[1..nn1][1..nn2][1..nn3].

(For two-dimensionaldata, one sets nn1 = 1.) The output data can be viewed as a single complex array with dimensions[1..nn1][1..nn2][1..nn3/2+1] (cf. equation 12.5.3), corresponding to the frequency componentsf1 and f2 being stored in wrap-around order, but only positive f3 values being stored (others beingobtainable by symmetry).

The output data is actually returned mostly in the input array data, but partlystored in the real array speq[1..nn1][1..2*nn2]. See text for details.Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited.

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Нашёл ошибку?
Или хочешь предложить что-то улучшить на этой странице? Напиши об этом и получи бонус!
Бонус рассчитывается индивидуально в каждом случае и может быть в виде баллов или бесплатной услуги от студизбы.
Предложить исправление
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5140
Авторов
на СтудИзбе
441
Средний доход
с одного платного файла
Обучение Подробнее