# \[ANN\] FIRLSFilterDesign.jl

**URL:** <https://discourse.julialang.org/t/ann-firlsfilterdesign-jl/59820>\
**Category:** Package Announcements\
**Tags:** package, dsp\
**Created:** [April 22, 2021, 6:44pm UTC](https://discourse.julialang.org/t/ann-firlsfilterdesign-jl/59820 "2021-04-22T18:44:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeoKoo](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@LeoKoo](https://discourse.julialang.org/u/LeoKoo)\
**Post date:** [April 22, 2021, 6:44pm UTC](https://discourse.julialang.org/t/ann-firlsfilterdesign-jl/59820/1 "2021-04-22T18:44:38Z")

</div>

Hi everyone,

I want to announce [FIRLSFilterDesign.jl](https://github.com/ltjkoomen/FIRLSFilterDesign.jl), which is a package that allows you to design linear phase Finite Impulse Response filters using weighted Least-Squares.

It supports:

- All types of linear phase FIR filters (type I, II, III, and IV)
- Piecewise-linear amplitude response-, and weighting functions

To design a type I passband filter you run the following commands in the Julia REPL:

```julia
using Pkg; Pkg.update(); Pkg.add("FIRLSFilterDesign")
using FIRLSFilterDesign
fs = 60 #Sampling frequency in Hz
filter_order = 10
antisymmetric = false
f_bands = [0. 10; 10 20; 20 30] #Frequency bands have to span [0,fs/2] and should not overlap
desired = [0. 0; 1 1; 0 0]
filter_coeff = firls_design(filter_order, f_bands, desired, antisymmetric; fs = fs)

```

If you want to apply a weighting function do the following:

```julia
using Pkg; Pkg.update(); Pkg.add("FIRLSFilterDesign")
using FIRLSFilterDesign
fs = 60 #Sampling frequency in Hz
filter_order = 10
antisymmetric = false
f_bands = [0. 10; 10 20; 20 30] #Frequency bands have to span [0,fs/2] and should not overlap
desired = [0. 0; 1 1; 0 0]
weights = [1. 2; 2 2; 2 1]
filter_coeff = firls_design(filter_order, f_bands, desired, weights, antisymmetric; fs = fs)

```

There are docs but they are not 100% there yet, planning on updating them over the course of a few weeks.

Cheers!

---

<div class="post-metadata">

**Author:** ![RGerzaguet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rgerzaguet/32/45492_2.png) [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)\
**Post date:** [April 23, 2021, 8:27am UTC](https://discourse.julialang.org/t/ann-firlsfilterdesign-jl/59820/2 "2021-04-23T08:27:02Z")

</div>

Thanks for this really interesting package !  
You maybe should consider to move it to the JuliaDSP workgroup ? It is closely related (and very complementary) to what is currently done iand it may ease to find your package.

---

<div class="post-metadata">

**Author:** ![LeoKoo](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@LeoKoo](https://discourse.julialang.org/u/LeoKoo)\
**Post date:** [April 23, 2021, 3:22pm UTC](https://discourse.julialang.org/t/ann-firlsfilterdesign-jl/59820/4 "2021-04-23T15:22:13Z")

</div>

Thanks for the compliment and advise 🙂

I am not sure how to proceed. How can I add my package to this workgroup, or contact the members of the group to see if they’re interested? I have tried mailing to [julia-dsp@googlegroups.com](mailto:julia-dsp@googlegroups.com), but I get an email back saying this address might not exist

---

<div class="post-metadata">

**Author:** ![RGerzaguet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rgerzaguet/32/45492_2.png) [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)\
**Post date:** [April 24, 2021, 8:11am UTC](https://discourse.julialang.org/t/ann-firlsfilterdesign-jl/59820/5 "2021-04-24T08:11:12Z")

</div>

I think that the simplest way is to contact directly one of the maintainer of the organisation (such as @ararslan or @galenlynch ) and see how they consider that 🙂

---

<div class="post-metadata">

**Author:** ![sirtom67](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sirtom67/32/3689_2.png) [@sirtom67](https://discourse.julialang.org/u/sirtom67)\
**Post date:** [July 5, 2021, 9:03pm UTC](https://discourse.julialang.org/t/ann-firlsfilterdesign-jl/59820/6 "2021-07-05T21:03:22Z")

</div>

+1 for adding this to DSP.jl.  
Submit a pull request to [GitHub - JuliaDSP/DSP.jl: Filter design, periodograms, window functions, and other digital signal processing functionality](https://github.com/JuliaDSP/DSP.jl).  
IMO the interface for firls should be consistent with remez.  
[DSP.jl/remez\_fir.jl at master · JuliaDSP/DSP.jl · GitHub](https://github.com/JuliaDSP/DSP.jl/blob/master/src/Filters/remez_fir.jl#L397)
