I have created a thesis using mathptmx font. Now I would like to customize only the section title using Latin Modern Sans Bold.
I used titlesec with
\usepackage{titlesec}
\titleformat{\section}
{\fontfamily{lmr}\sffamily\bfseries\Large}
{\thesection}{1em}{}
I would like to know if this is right because I'm not convinced.

\fontfamily{lmss}\bfseries\Large– egreg Jan 18 at 12:14