Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

EXPNDI_BY

Expand a variable by inserting gaps

EXPNDI_BY(dat,mask,outsize)

 

Arguments:

DAT

Variable to expand on X axis

 

MASK

mask of valid/bad points to use in expanding the data in X

 

OUTPTS

length in X of output array: size of argument 1 plus number of valid points in the mask

Result Axes:

X

Abstract

 

Y

Inherited from VAR and MASK

 

Z

Inherited from VAR and MASK

 

T

Inherited from VAR and MASK

 

E

Inherited from VAR and MASK

 

F

Inherited from VAR and MASK

 

Example:

Simple example: Compress variable "dat" along its I axis using the mask supplied in the second argument.

yes? let a = {1,4,5,6,7,12,15,16}
yes? let b = {,1,,,1,1,}
 
yes? let apts = `a,return=isize`
!-> DEFINE VARIABLE apts = 8
 
yes? let maskpts = `b[i=@ngd]`
!-> DEFINE VARIABLE maskpts = 3
 
yes? let outpts = apts + maskpts
yes? list expndi_by(a,b,outpts)
VARIABLE : EXPNDI_BY(A,B,OUTPTS)
SUBSET   : 11 points (X)
1    /  1:   1.00
2    /  2:   ...
3    /  3:   4.00
4    /  4:   5.00
5    /  5:   6.00
6    /  6:   ...
7    /  7:   7.00
8    /  8:   ...
9    /  9:  12.00
10   / 10:  15.00
11   / 11:   ...